commit 73761723c0e79152165b6c5c330c5aa88ba1f8fa
parent 6bed648eb2fb95baddb0275efb5688360d2c419a
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 2 Jul 2012 00:22:14 -0400
Don't use instanceof Array check in ZU.xpath. It fails in Firefox because Array in the sandbox != Array outside of the sandbox. Instead, just check for a length property.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
@@ -963,7 +963,7 @@ Zotero.Utilities = {
};
}
- if(!(elements instanceof Array)) elements = [elements];
+ if(!("length" in elements)) elements = [elements];
var results = [];
for(var i=0, n=elements.length; i<n; i++) {