Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 2871f813
authored
Feb 09, 2014
by
Sohum Banerjea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optClone wasn't in the associations path
1 parent
0338f405
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
lib/dao-factory.js
lib/dao-factory.js
View file @
2871f81
...
@@ -1458,11 +1458,14 @@ module.exports = (function() {
...
@@ -1458,11 +1458,14 @@ module.exports = (function() {
var
optClone
=
function
(
options
)
{
var
optClone
=
function
(
options
)
{
return
Utils
.
_
.
cloneDeep
(
options
,
function
(
elem
)
{
return
Utils
.
_
.
cloneDeep
(
options
,
function
(
elem
)
{
// The DAOFactories used for include are pass by ref, so don't clone them.
Otherwise return undefined, meaning, 'handle this lodash'
// The DAOFactories used for include are pass by ref, so don't clone them.
if
(
elem
instanceof
DAOFactory
||
elem
instanceof
Utils
.
col
||
elem
instanceof
Utils
.
literal
||
elem
instanceof
Utils
.
cast
||
elem
instanceof
Utils
.
fn
||
elem
instanceof
Utils
.
and
||
elem
instanceof
Utils
.
or
)
{
if
(
elem
instanceof
DAOFactory
||
elem
instanceof
Utils
.
col
||
elem
instanceof
Utils
.
literal
||
elem
instanceof
Utils
.
cast
||
elem
instanceof
Utils
.
fn
||
elem
instanceof
Utils
.
and
||
elem
instanceof
Utils
.
or
)
{
return
elem
return
elem
}
}
// Unfortunately, lodash.cloneDeep doesn't preserve Buffer.isBuffer, which we have to rely on for binary data
if
(
Buffer
.
isBuffer
(
elem
))
{
return
new
Buffer
(
elem
);
}
// Otherwise return undefined, meaning, 'handle this lodash'
return
undefined
return
undefined
})
})
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment