Merge pull request #751 from clarkorz/fix/global-leak
fix a global leak and two typo
This commit is contained in:
commit
5ca9c47f44
|
@ -1211,7 +1211,7 @@ DataAccessObject._coerce = function (where) {
|
|||
case 'regexp':
|
||||
val = utils.toRegExp(val);
|
||||
if (val instanceof Error) {
|
||||
result.statusCode = 400;
|
||||
val.statusCode = 400;
|
||||
throw err;
|
||||
}
|
||||
break;
|
||||
|
@ -2407,7 +2407,7 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, op
|
|||
if (strict && !allowExtendedOperators) {
|
||||
var props = Model.definition.properties;
|
||||
var keys = Object.keys(data);
|
||||
var result = {};
|
||||
var result = {}, key;
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
key = keys[i];
|
||||
if (props[key]) {
|
||||
|
|
|
@ -111,7 +111,7 @@ ModelDefinition.prototype.columnNames = function (connectorType) {
|
|||
var cols = [];
|
||||
for (var p in props) {
|
||||
if (props[p][connectorType]) {
|
||||
cols.push(property[connectorType].column || props[p][connectorType].columnName || p);
|
||||
cols.push(props[connectorType].column || props[p][connectorType].columnName || p);
|
||||
} else {
|
||||
cols.push(p);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue