From 67650253958df9fcbc96d3b91c5c961d814489a7 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Fri, 16 Sep 2011 02:32:44 -0400 Subject: [PATCH] array_p: test constructor.name instead of constructor Had cases where array_p returned the wrong value in XULRunner 7.0. --- modules/array.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/array.js b/modules/array.js index 99cc3af..c73045a 100644 --- a/modules/array.js +++ b/modules/array.js @@ -13,7 +13,8 @@ in_module(null); * array_p returns true if its argument is an array, otherwise false. */ function array_p (ob) { - return ob && ob.constructor == Array || false; + return ob && ob.constructor && + ob.constructor.name == "Array" || false; } /** -- 2.11.4.GIT