teamplay 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamplay",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Full-stack signals ORM with multiplayer",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@nx-js/observer-util": "^4.1.3",
26
- "@teamplay/backend": "^0.2.0",
27
- "@teamplay/cache": "^0.2.0",
28
- "@teamplay/channel": "^0.2.0",
29
- "@teamplay/debug": "^0.2.0",
30
- "@teamplay/schema": "^0.2.0",
31
- "@teamplay/utils": "^0.2.0",
26
+ "@teamplay/backend": "^0.2.1",
27
+ "@teamplay/cache": "^0.2.1",
28
+ "@teamplay/channel": "^0.2.1",
29
+ "@teamplay/debug": "^0.2.1",
30
+ "@teamplay/schema": "^0.2.1",
31
+ "@teamplay/utils": "^0.2.1",
32
32
  "diff-match-patch": "^1.0.5",
33
33
  "events": "^3.3.0",
34
34
  "json0-ot-diff": "^1.1.2",
@@ -63,5 +63,5 @@
63
63
  ]
64
64
  },
65
65
  "license": "MIT",
66
- "gitHead": "34435bba6654d480cac0e809defc15e1d15bd543"
66
+ "gitHead": "4b4a3de5f145338b78de3cf2f461b6824ab8163f"
67
67
  }
@@ -1,3 +1,5 @@
1
+ import isPlainObject from 'lodash/isPlainObject.js'
2
+
1
3
  export default function setDiffDeep (existing, updated) {
2
4
  // Handle primitive types, null, and type mismatches
3
5
  if (existing === null || updated === null ||
@@ -15,6 +17,12 @@ export default function setDiffDeep (existing, updated) {
15
17
  return existing
16
18
  }
17
19
 
20
+ // Handle non-plain objects - just return them as-is to fully overwrite
21
+ // and don't try to update an old object in-place
22
+ if (!isPlainObject(updated)) {
23
+ return updated
24
+ }
25
+
18
26
  // Handle objects
19
27
  for (const key in existing) {
20
28
  if (!(key in updated)) {