Skip to content

Commit

Permalink
Merge pull request #27216 from storybookjs/valentin/fix-reactivity-is…
Browse files Browse the repository at this point in the history
…sue-in-pre-svelte-component

Sandbox: Fix reactivity in Svelte Pre component
  • Loading branch information
valentinpalkovic authored May 21, 2024
2 parents 84fa690 + d429ce0 commit ad019b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/renderers/svelte/template/components/Pre.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
export let text = '';
const finalText = object ? JSON.stringify(object, null, 2) : text;
$: finalText = object ? JSON.stringify(object, null, 2) : text;
</script>

<pre data-testid="pre" {style}>{finalText}</pre>

0 comments on commit ad019b5

Please sign in to comment.