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.

This commit is contained in:
Simon Kornblith 2012-07-02 00:22:14 -04:00
parent 6bed648eb2
commit 73761723c0

View file

@ -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++) {