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

Commit 631f555c by Tommy Odom Committed by GitHub

fix: use lodash _baseIsNative directly instead of _.isNative (#12358) (#12475) (#12480)

1 parent 5cabcbc8
Showing with 4 additions and 1 deletions
......@@ -3,6 +3,7 @@
const DataTypes = require('./data-types');
const SqlString = require('./sql-string');
const _ = require('lodash');
const baseIsNative = require('lodash/_baseIsNative');
const uuidv1 = require('uuid').v1;
const uuidv4 = require('uuid').v4;
const operators = require('./operators');
......@@ -51,7 +52,9 @@ function mergeDefaults(a, b) {
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 (!_.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 objectValue;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!