Fix support for old type-forcing object syntax for DB query parameters

This commit is contained in:
Dan Stillman 2016-04-25 00:48:02 -04:00
parent a605fe1cff
commit 010249e49b

View file

@ -127,7 +127,8 @@ Zotero.DBConnection.prototype.getAsyncStatement = Zotero.Promise.coroutine(funct
Zotero.DBConnection.prototype.parseQueryAndParams = function (sql, params) {
// If single scalar value, wrap in an array
if (!Array.isArray(params)) {
if (typeof params == 'string' || typeof params == 'number' || params === null) {
if (typeof params == 'string' || typeof params == 'number' || typeof params == 'object'
|| params === null) {
params = [params];
}
else {