mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
guard render to check for children
This commit is contained in:
parent
1a500bff43
commit
aeec89c8a9
@ -42,7 +42,7 @@
|
||||
{theme}
|
||||
{root}
|
||||
>
|
||||
{#if children.length}
|
||||
{#if children && children.length}
|
||||
{#each children as { component, id, props, children, has_modes }}
|
||||
<svelte:self
|
||||
{component}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { getNextColor } from "./utils";
|
||||
|
||||
export let value: Array<[string, string | number]>;
|
||||
export let value: Array<[string, string | number]> = [];
|
||||
export let theme: string = "default";
|
||||
export let show_legend: boolean = false;
|
||||
export let color_map: Record<string, string> = {};
|
||||
@ -51,6 +51,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
correct_color_map();
|
||||
</script>
|
||||
|
||||
<div class="output-highlightedtext" {theme}>
|
||||
|
Loading…
Reference in New Issue
Block a user