From 13104590d21f0269b3fabbb84f0744825202813c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 24 Sep 2006 08:22:19 +0000 Subject: [PATCH] Array test in DB.statementQuery() didn't work if array was passed from the autocomplete service --- chrome/chromeFiles/content/scholar/xpcom/db.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/db.js b/chrome/chromeFiles/content/scholar/xpcom/db.js index 23762f4a2..4fe699215 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/db.js +++ b/chrome/chromeFiles/content/scholar/xpcom/db.js @@ -175,10 +175,9 @@ Scholar.DB = new function(){ } if (statement && params){ - // If single scalar value or single object, wrap in an array - if ((typeof params != 'object' || params===null) || - (params && typeof params == 'object' && - params.constructor != Array)){ + // If single scalar value or single non-array object, wrap in an array + if (typeof params != 'object' || params===null || + (params && typeof params == 'object' && !params.length)){ params = [params]; }