Skip to content

Commit 2db1675

Browse files
authored
fix: empty q:obj (#286)
1 parent a97c92b commit 2db1675

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@builder.io/qwik",
3-
"version": "0.0.18-2",
3+
"version": "0.0.18-3",
44
"description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
55
"scripts": {
66
"build": "node scripts --tsc --build --api --platform-binding --wasm",

src/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-qwik",
3-
"version": "0.0.18-2",
3+
"version": "0.0.18-3",
44
"description": "Interactive CLI and API for generating Qwik projects.",
55
"bin": {
66
"create-qwik": "create-qwik"

src/core/object/store.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ export function QStore_hydrate(doc: Document) {
4949
const host = el.getAttribute(QHostAttr);
5050
const ctx = getContext(el);
5151
qobj!.split(' ').forEach((part) => {
52-
const obj = part[0] === ELEMENT_ID_PREFIX ? elements.get(part) : meta.objs[strToInt(part)];
53-
assertDefined(obj);
54-
ctx.refMap.add(obj);
52+
if (part !== '') {
53+
const obj =
54+
part[0] === ELEMENT_ID_PREFIX ? elements.get(part) : meta.objs[strToInt(part)];
55+
assertDefined(obj);
56+
ctx.refMap.add(obj);
57+
}
5558
});
5659
if (host) {
5760
const [props, events] = host.split(' ').map(strToInt);

0 commit comments

Comments
 (0)