Skip to content

Commit fad4b7b

Browse files
committed
fix if beforeCreate returns false the component will be not created
1 parent 30a8b6b commit fad4b7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dist/esm/component/createInstance.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ function createInstance(cfg = {}) {
199199
});
200200
}
201201
}
202-
if (!newElement || newElement.__beforeCreateReturnsFalse) {
202+
if (newElement && newElement.__beforeCreateReturnsFalse) {
203+
newElement = undefined;
204+
}
205+
if (!newElement) {
203206
$child = $child.nextElementSibling;
204207
continue;
205208
}

0 commit comments

Comments
 (0)