Fix support for old type-forcing object syntax for DB query parameters
This commit is contained in:
parent
a605fe1cff
commit
010249e49b
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ Zotero.DBConnection.prototype.getAsyncStatement = Zotero.Promise.coroutine(funct
|
||||||
Zotero.DBConnection.prototype.parseQueryAndParams = function (sql, params) {
|
Zotero.DBConnection.prototype.parseQueryAndParams = function (sql, params) {
|
||||||
// If single scalar value, wrap in an array
|
// If single scalar value, wrap in an array
|
||||||
if (!Array.isArray(params)) {
|
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];
|
params = [params];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue