docs(component-api): account for undefined type

This commit is contained in:
Eric Y Liu 2021-06-26 14:08:55 -07:00
commit a1f05afbf3

View file

@ -78,10 +78,10 @@
{/if}
</StructuredListCell>
<StructuredListCell>
{#each prop.type.split(" | ") as type, i (type)}
{#each (prop.type || "").split(" | ") as type, i (type)}
<div
class="cell"
style="z-index: {prop.type.split(' | ').length - i}"
style="z-index: {(prop.type || '').split(' | ').length - i}"
>
{#if type.startsWith("typeof")}
<TooltipDefinition