diff --git a/.changeset/warm-jokes-fetch.md b/.changeset/warm-jokes-fetch.md new file mode 100644 index 0000000000..53577b67d9 --- /dev/null +++ b/.changeset/warm-jokes-fetch.md @@ -0,0 +1,23 @@ +--- +"@gradio/audio": patch +"@gradio/checkbox": patch +"@gradio/code": patch +"@gradio/colorpicker": patch +"@gradio/dataset": patch +"@gradio/dropdown": patch +"@gradio/file": patch +"@gradio/fileexplorer": patch +"@gradio/image": patch +"@gradio/markdown": patch +"@gradio/model3d": patch +"@gradio/number": patch +"@gradio/radio": patch +"@gradio/simpledropdown": patch +"@gradio/simpleimage": patch +"@gradio/simpletextbox": patch +"@gradio/textbox": patch +"@gradio/video": patch +"gradio": patch +--- + +fix:Handle the case where examples is `null` for all components diff --git a/js/audio/AudioExample.stories.svelte b/js/audio/AudioExample.stories.svelte new file mode 100644 index 0000000000..03be9fab22 --- /dev/null +++ b/js/audio/AudioExample.stories.svelte @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/js/audio/Example.svelte b/js/audio/Example.svelte index 6b6a4a08c9..1ebb90d67d 100644 --- a/js/audio/Example.svelte +++ b/js/audio/Example.svelte @@ -1,5 +1,5 @@ @@ -9,7 +9,7 @@ class:gallery={type === "gallery"} class:selected > - {value} + {value ? value : ""} diff --git a/js/markdown/Example.svelte b/js/markdown/Example.svelte index fa8f1b800e..40f17abb05 100644 --- a/js/markdown/Example.svelte +++ b/js/markdown/Example.svelte @@ -1,7 +1,7 @@ @@ -9,7 +9,7 @@ class:gallery={type === "gallery"} class:selected > - {value} + {value ? value : ""} diff --git a/js/simpletextbox/Example.svelte b/js/simpletextbox/Example.svelte index 1fdf7500fa..e8e8130c29 100644 --- a/js/simpletextbox/Example.svelte +++ b/js/simpletextbox/Example.svelte @@ -1,7 +1,7 @@ + + + + + + + + diff --git a/js/video/Example.svelte b/js/video/Example.svelte index 34ac786787..305f343988 100644 --- a/js/video/Example.svelte +++ b/js/video/Example.svelte @@ -20,25 +20,27 @@ } -{#if playable()} -
-
-{:else} -
{value}
+{#if value} + {#if playable()} +
+
+ {:else} +
{value}
+ {/if} {/if}