Skip to content

Commit

Permalink
Sandbox: Fix reactivity in Svelte Pre component
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 21, 2024
1 parent 84fa690 commit d429ce0
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 d429ce0

Please sign in to comment.