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
(cherry picked from commit ad019b5)
  • Loading branch information
valentinpalkovic authored and storybook-bot committed May 21, 2024
1 parent 1db21e8 commit 7deb5d0
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 7deb5d0

Please sign in to comment.