vis-util 5.0.4 → 5.0.5

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.
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * utilitie collection for visjs
6
6
  *
7
- * @version 5.0.4
8
- * @date 2023-09-13T20:29:32.256Z
7
+ * @version 5.0.5
8
+ * @date 2023-10-03T18:47:58.061Z
9
9
  *
10
10
  * @copyright (c) 2011-2017 Almende B.V, http://almende.com
11
11
  * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
@@ -71,6 +71,10 @@
71
71
  }
72
72
  const a = values[0];
73
73
  const b = values[1];
74
+ if (a instanceof Date && b instanceof Date) {
75
+ a.setTime(b.getTime());
76
+ return a;
77
+ }
74
78
  for (const prop of Reflect.ownKeys(b)) {
75
79
  if (!Object.prototype.propertyIsEnumerable.call(b, prop)) ;
76
80
  else if (b[prop] === DELETE) {
@@ -101,6 +105,9 @@
101
105
  return a.map((value) => clone(value));
102
106
  }
103
107
  else if (typeof a === "object" && a !== null) {
108
+ if (a instanceof Date) {
109
+ return new Date(a.getTime());
110
+ }
104
111
  return deepObjectAssignNonentry({}, a);
105
112
  }
106
113
  else {