ut2 1.5.5 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  一个现代 JavaScript 实用工具库。[点击查看在线文档]。
4
4
 
5
- [![npm][npm]][npm-url] [![Build and Deploy Docs](https://github.com/caijf/ut2/actions/workflows/ci.yml/badge.svg)](https://github.com/caijf/ut2/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/caijf/ut2/branch/main/graph/badge.svg?token=XKTS0H7085)](https://codecov.io/gh/caijf/ut2) [![Static Badge](https://img.shields.io/badge/benchmark-online-green)](https://codesandbox.io/s/github/caijf/ut2/tree/main/benchmark) ![npm](https://img.shields.io/npm/dt/ut2) ![GitHub](https://img.shields.io/github/license/caijf/ut2.svg)
5
+ [![npm][npm]][npm-url] [![Build and Deploy Docs](https://github.com/caijf/ut2/actions/workflows/ci.yml/badge.svg)](https://github.com/caijf/ut2/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/caijf/ut2/branch/main/graph/badge.svg?token=XKTS0H7085)](https://codecov.io/gh/caijf/ut2) [![Static Badge](https://img.shields.io/badge/benchmark-online-green)](https://s57jpy.csb.app/) ![npm](https://img.shields.io/npm/dt/ut2) ![GitHub](https://img.shields.io/github/license/caijf/ut2.svg)
6
6
 
7
7
  ## 比较
8
8
 
package/dist/ut2.js CHANGED
@@ -499,7 +499,7 @@
499
499
  return value == null || value !== value ? defaultValue : value;
500
500
  }
501
501
 
502
- var VERSION = "1.5.5";
502
+ var VERSION = "1.5.6";
503
503
  var supportedArgumentsType = getTag((function () { return arguments; })()) === argumentsTag;
504
504
  var FUNC_ERROR_TEXT = 'Expected a function';
505
505
  function toSource(func) {
@@ -1351,17 +1351,17 @@
1351
1351
  if (newValue === undefined) {
1352
1352
  newValue = srcValue;
1353
1353
  }
1354
- if (isObjectLike(newValue) && key in obj && !storage.has(newValue)) {
1354
+ if (isObjectLike(newValue) && !storage.has(newValue)) {
1355
1355
  storage.set(newValue, true);
1356
1356
  var objValue = obj[key];
1357
1357
  var newObjValue = void 0;
1358
1358
  if (isArray(newValue)) {
1359
1359
  newObjValue = isArray(objValue) ? objValue : [];
1360
1360
  }
1361
- else {
1362
- newObjValue = isObjectLike(objValue) ? objValue : {};
1361
+ else if (isPlainObject(newValue)) {
1362
+ newObjValue = isPlainObject(objValue) ? objValue : {};
1363
1363
  }
1364
- obj[key] = baseMerge(newObjValue, newValue, customizer, storage);
1364
+ obj[key] = newObjValue ? baseMerge(newObjValue, newValue, customizer, storage) : newValue;
1365
1365
  }
1366
1366
  else {
1367
1367
  if (newValue !== undefined || (newValue === undefined && !(key in obj))) {