Skip to content

Commit 7dbb37c

Browse files
committed
Accepts obj without defaults
1 parent 9baffaa commit 7dbb37c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/optimizely-cms-sdk/src/render/componentRegistry.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ type ComponentMap<C> = Record<string, ComponentEntry<C>>;
4747

4848
/** Returns true if `obj` is type {@linkcode ComponentWithVariants} */
4949
function hasVariants(obj: unknown): obj is ComponentWithVariants<unknown> {
50-
return (
51-
typeof obj === 'object' && obj !== null && 'default' in obj && 'tags' in obj
52-
);
50+
return typeof obj === 'object' && obj !== null && 'tags' in obj;
5351
}
5452

5553
/** Returns the default component in an {@linkcode ComponentEntry} */

0 commit comments

Comments
 (0)