@lvce-editor/virtual-dom 1.0.2 → 1.0.3

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/dist/index.js CHANGED
@@ -14,6 +14,9 @@ var getUidTarget = ($Element) => {
14
14
  };
15
15
  var getComponentUid = ($Element) => {
16
16
  const $Target = getUidTarget($Element);
17
+ if (!$Target) {
18
+ return 0;
19
+ }
17
20
  return $Target[uidSymbol];
18
21
  };
19
22
  var getComponentUidFromEvent = (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -16,6 +16,9 @@ const getUidTarget = ($Element) => {
16
16
 
17
17
  export const getComponentUid = ($Element) => {
18
18
  const $Target = getUidTarget($Element)
19
+ if (!$Target) {
20
+ return 0
21
+ }
19
22
  return $Target[uidSymbol]
20
23
  }
21
24