@lightningjs/blits 0.3.3 → 0.3.4

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.
@@ -31,6 +31,6 @@
31
31
  "vite": "^4.0.4"
32
32
  },
33
33
  "dependencies": {
34
- "@lightningjs/blits": "^0.3.1"
34
+ "@lightningjs/blits": "^0.3.4"
35
35
  }
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.cjs",
6
6
  "exports": {
@@ -36,7 +36,10 @@ const reactiveProxy = (target) => {
36
36
  }
37
37
  track(target, key)
38
38
 
39
- if (typeof target[key] === 'object') {
39
+ if (
40
+ typeof target[key] === 'object' &&
41
+ Object.getPrototypeOf(target[key]) === Object.prototype
42
+ ) {
40
43
  return reactiveProxy(target[key])
41
44
  }
42
45
 
@@ -68,8 +71,10 @@ const reactiveDefineProperty = (target) => {
68
71
  Object.keys(target).forEach((key) => {
69
72
  let internalValue = target[key]
70
73
 
71
- // can be improved
72
- if (typeof target[key] === 'object') {
74
+ if (
75
+ typeof target[key] === 'object' &&
76
+ Object.getPrototypeOf(target[key]) === Object.prototype
77
+ ) {
73
78
  return reactiveDefineProperty(target[key])
74
79
  }
75
80