diff --git a/src/index.tsx b/src/index.tsx index 0e8a12e..a31bb67 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -193,7 +193,7 @@ function makeComponent(baseName: string, rootDef: TagDef, rootProps: Record } @@ -284,7 +284,7 @@ export function createScope(scope: string) { return { define: (nameOrDef: string | TagDef, defIfNamed?: TagDef) => { if (typeof nameOrDef === 'string') - return define(`${scope}${nameOrDef === 'Root' ? '' : nameOrDef}`, defIfNamed) + return define(`${scope}${nameOrDef === 'Root' ? '' : nameOrDef}`, defIfNamed!) else return define(`${scope}${anonName(nameOrDef)}`, nameOrDef as TagDef) }