Skip to content

Commit

Permalink
fix: strictest
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Jan 4, 2025
1 parent a2d9f39 commit 2f94693
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/make.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ export function make<T>(comps: CompList<T> = []): GameObj<T> {
// for use add(["tag"])
return tags.add(comp);
}
else if (typeof comp != "object") {
else if (!comp || typeof comp != "object") {
throw new Error(
`You can only pass a component or a string to .use(), you passed: ${typeof comp}`,
`You can only pass a component or a string to .use(), you passed a "${typeof comp}"`,
);
}

Expand Down

0 comments on commit 2f94693

Please sign in to comment.