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

Commit 0b75f1b7 by Jan Aagaard Meier

Move optClone call to a proper place

1 parent e2777690
Showing with 2 additions and 3 deletions
......@@ -325,7 +325,7 @@ module.exports = (function() {
DAOFactory.prototype.findAll = function(options, queryOptions) {
var hasJoin = false
var options = optClone(options)
options = optClone(options)
if (typeof options === 'object') {
if (options.hasOwnProperty('include')) {
......@@ -368,8 +368,6 @@ module.exports = (function() {
DAOFactory.prototype.find = function(options, queryOptions) {
var hasJoin = false
options = optClone(options)
// no options defined?
// return an emitter which emits null
if ([null, undefined].indexOf(options) !== -1) {
......@@ -381,6 +379,7 @@ module.exports = (function() {
var primaryKeys = this.primaryKeys
, keys = Object.keys(primaryKeys)
, keysLength = keys.length
options = optClone(options)
// options is not a hash but an id
if (typeof options === 'number') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!