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
@@ -69,6 +69,10 @@ function deepObjectAssignNonentry(...values) {
69
69
  }
70
70
  const a = values[0];
71
71
  const b = values[1];
72
+ if (a instanceof Date && b instanceof Date) {
73
+ a.setTime(b.getTime());
74
+ return a;
75
+ }
72
76
  for (const prop of Reflect.ownKeys(b)) {
73
77
  if (!Object.prototype.propertyIsEnumerable.call(b, prop)) ;
74
78
  else if (b[prop] === DELETE) {
@@ -99,6 +103,9 @@ function clone(a) {
99
103
  return a.map((value) => clone(value));
100
104
  }
101
105
  else if (typeof a === "object" && a !== null) {
106
+ if (a instanceof Date) {
107
+ return new Date(a.getTime());
108
+ }
102
109
  return deepObjectAssignNonentry({}, a);
103
110
  }
104
111
  else {