Array test in DB.statementQuery() didn't work if array was passed from the autocomplete service

This commit is contained in:
Dan Stillman 2006-09-24 08:22:19 +00:00
parent 3b55fe520c
commit 13104590d2

View File

@ -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];
}