diff --git a/front/src/Components/TypeMessage/BanMessage.svelte b/front/src/Components/TypeMessage/BanMessage.svelte index faeae923..718170f9 100644 --- a/front/src/Components/TypeMessage/BanMessage.svelte +++ b/front/src/Components/TypeMessage/BanMessage.svelte @@ -3,7 +3,10 @@ import { banMessageVisibleStore, banMessageContentStore } from "../../Stores/TypeMessageStore/BanMessageStore"; import { onMount } from "svelte"; - const text = $banMessageContentStore; + let text: string; + $: { + text = $banMessageContentStore; + } const NAME_BUTTON = "Ok"; let nbSeconds = 10; let nameButton = ""; diff --git a/front/src/Components/TypeMessage/TextMessage.svelte b/front/src/Components/TypeMessage/TextMessage.svelte index 1541ab6e..78f4df41 100644 --- a/front/src/Components/TypeMessage/TextMessage.svelte +++ b/front/src/Components/TypeMessage/TextMessage.svelte @@ -3,8 +3,11 @@ import { textMessageContentStore, textMessageVisibleStore } from "../../Stores/TypeMessageStore/TextMessageStore"; import { QuillDeltaToHtmlConverter } from "quill-delta-to-html"; - const content = JSON.parse($textMessageContentStore); - const converter = new QuillDeltaToHtmlConverter(content.ops, { inlineStyles: true }); + let converter: QuillDeltaToHtmlConverter; + $: { + const content = JSON.parse($textMessageContentStore); + converter = new QuillDeltaToHtmlConverter(content.ops, { inlineStyles: true }); + } const NAME_BUTTON = "Ok"; function closeTextMessage() {