Merge pull request #751 from clarkorz/fix/global-leak

fix a global leak and two typo
This commit is contained in:
Raymond Feng 2015-11-03 23:04:38 -08:00
commit 5ca9c47f44
2 changed files with 3 additions and 3 deletions

View File

@ -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]) {

View File

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