From a412de0685b188a7ebe54766e18c4086ba34f15d Mon Sep 17 00:00:00 2001 From: PleahMaCaka Date: Thu, 2 Nov 2023 12:17:08 +0900 Subject: [PATCH] chore: do not logging if not debug mode --- src/lib/components/share/ChatInput.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/share/ChatInput.svelte b/src/lib/components/share/ChatInput.svelte index 0f5ec75..deebfa7 100644 --- a/src/lib/components/share/ChatInput.svelte +++ b/src/lib/components/share/ChatInput.svelte @@ -3,6 +3,7 @@ import { stateStore } from "$lib/stores/StateStore" import Icon from "@iconify/svelte" import { onMount } from "svelte" + import { get } from "svelte/store" let text: string = "" @@ -16,7 +17,8 @@ if (text.length === 0) return if (text.trim() === "") return - console.log("Text Submitted:", text) + if (get(stateStore).debug) + console.log("Text Submitted:", text) $stateStore.input = text text = ""