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

Commit 5ca77c33 by Daniel Durante

Converted some array.length to array.push

1 parent a1bc2e63
Showing with 3 additions and 3 deletions
......@@ -648,7 +648,7 @@ module.exports = (function() {
values[updatedAtAttr] = Utils.now()
}
records[records.length] = values
records.push(values)
})
self.QueryInterface.bulkInsert(self.tableName, records)
......
......@@ -105,11 +105,11 @@ module.exports = (function() {
if (fields) {
if (self.__options.timestamps) {
if (fields.indexOf(updatedAtAttr) === -1) {
fields[fields.length] = updatedAtAttr
fields.push(updatedAtAttr)
}
if (fields.indexOf(createdAtAttr) === -1 && this.isNewRecord === true) {
fields[fields.length] = createdAtAttr
fields.push(createdAtAttr)
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!