From 73761723c0e79152165b6c5c330c5aa88ba1f8fa Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 2 Jul 2012 00:22:14 -0400 Subject: [PATCH] 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. --- chrome/content/zotero/xpcom/utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index ef2882e21..885096323 100644 --- 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