core: add null check

This commit is contained in:
undefined committed 2021-05-29 14:31:13 +08:00
1 parent 105608558f
commit d5e67de7ad
4 files changed
+4 -9

No files matched your search

@@ -111,15 +111,11 @@ export default class DOMAttachedObject {
}
constructor($dom, monitorDetach = false) {
if ($dom == null) {
return null;
}
if ($dom == null) return null;
this.$dom = $dom;
this.id = ++DOMAttachedObject.uniqueIdCounter;
this.eventNS = `vj4obj_${this.id}`;
this.detached = false;
if (monitorDetach) {
monitorResource(this);
}
if (monitorDetach) monitorResource(this);
}
}