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 631f555c
authored
Jul 10, 2020
by
Tommy Odom
Committed by
GitHub
Jul 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use lodash _baseIsNative directly instead of _.isNative (#12358) (#12475) (#12480)
1 parent
5cabcbc8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
lib/utils.js
lib/utils.js
View file @
631f555
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
const
DataTypes
=
require
(
'./data-types'
);
const
DataTypes
=
require
(
'./data-types'
);
const
SqlString
=
require
(
'./sql-string'
);
const
SqlString
=
require
(
'./sql-string'
);
const
_
=
require
(
'lodash'
);
const
_
=
require
(
'lodash'
);
const
baseIsNative
=
require
(
'lodash/_baseIsNative'
);
const
uuidv1
=
require
(
'uuid'
).
v1
;
const
uuidv1
=
require
(
'uuid'
).
v1
;
const
uuidv4
=
require
(
'uuid'
).
v4
;
const
uuidv4
=
require
(
'uuid'
).
v4
;
const
operators
=
require
(
'./operators'
);
const
operators
=
require
(
'./operators'
);
...
@@ -51,7 +52,9 @@ function mergeDefaults(a, b) {
...
@@ -51,7 +52,9 @@ function mergeDefaults(a, b) {
return
_
.
mergeWith
(
a
,
b
,
(
objectValue
,
sourceValue
)
=>
{
return
_
.
mergeWith
(
a
,
b
,
(
objectValue
,
sourceValue
)
=>
{
// If it's an object, let _ handle it this time, we will be called again for each property
// If it's an object, let _ handle it this time, we will be called again for each property
if
(
!
_
.
isPlainObject
(
objectValue
)
&&
objectValue
!==
undefined
)
{
if
(
!
_
.
isPlainObject
(
objectValue
)
&&
objectValue
!==
undefined
)
{
if
(
_
.
isFunction
(
objectValue
)
&&
_
.
isNative
(
objectValue
))
{
// _.isNative includes a check for core-js and throws an error if present.
// Depending on _baseIsNative bypasses the core-js check.
if
(
_
.
isFunction
(
objectValue
)
&&
baseIsNative
(
objectValue
))
{
return
sourceValue
||
objectValue
;
return
sourceValue
||
objectValue
;
}
}
return
objectValue
;
return
objectValue
;
...
...
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