Skip to content

Commit

Permalink
fix: issue with instance property being read on ssr test load
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Apr 22, 2022
1 parent 2757b7b commit 7fb3398
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export async function render<T extends Template>(
};

return {
...within(container as any as HTMLElement),
container,
instance,
emitted<N extends string = "*">(
Expand Down Expand Up @@ -132,7 +133,6 @@ export async function render<T extends Template>(
logDOM(element, maxLength, options);
}
},
...within(container as any as HTMLElement),
} as const;
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export async function render<T extends Template>(
Object.assign(screen, queries);

return {
...queries,
container,
get instance(): any {
throw new Error(
Expand Down Expand Up @@ -110,7 +111,6 @@ export async function render<T extends Template>(

cleanupComponent();
},
...queries,
} as const;
}

Expand Down

0 comments on commit 7fb3398

Please sign in to comment.