不要怂,就是干,撸起袖子干!

Commit b5f7153c by Mick Hansen

refactor(sql/where): .forIn -> .forOwn

1 parent 9d5fcc2a
Showing with 3 additions and 3 deletions
...@@ -1618,7 +1618,7 @@ module.exports = (function() { ...@@ -1618,7 +1618,7 @@ module.exports = (function() {
key = aliasMap[key] || key; key = aliasMap[key] || key;
if (_.isPlainObject(value)) { if (_.isPlainObject(value)) {
_.forIn(value, function (item, key) { _.forOwn(value, function (item, key) {
if (aliasMap[key]) { if (aliasMap[key]) {
value[aliasMap[key]] = item; value[aliasMap[key]] = item;
delete value[key]; delete value[key];
...@@ -1662,7 +1662,7 @@ module.exports = (function() { ...@@ -1662,7 +1662,7 @@ module.exports = (function() {
if (_.isPlainObject(value) && Object.keys(value).length > 1) { if (_.isPlainObject(value) && Object.keys(value).length > 1) {
return (function () { return (function () {
var $items = []; var $items = [];
_.forIn(value, function (item, logic) { _.forOwn(value, function (item, logic) {
var $where = {}; var $where = {};
$where[logic] = item; $where[logic] = item;
$items.push(self.whereItemQuery(key, $where, options)); $items.push(self.whereItemQuery(key, $where, options));
...@@ -1692,7 +1692,7 @@ module.exports = (function() { ...@@ -1692,7 +1692,7 @@ module.exports = (function() {
}).join(' AND '); }).join(' AND ');
} else { } else {
if (_.isPlainObject(value)) { if (_.isPlainObject(value)) {
_.forIn(value, function (item, key) { _.forOwn(value, function (item, key) {
if (comparatorMap[key]) { if (comparatorMap[key]) {
comparator = comparatorMap[key]; comparator = comparatorMap[key];
value = item; value = item;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!