fix reactivity issue

this broke somewhere down the line and needs a tick now
This commit is contained in:
llama 2025-10-24 19:45:02 +08:00
parent 0c66df1dc3
commit 8d2fab7dea
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -23,6 +23,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import Term from "./Term.svelte";
import AnkiWillStart from "./AnkiWillStart.svelte";
import type { Terminal } from "@xterm/xterm";
import { tick } from "svelte";
let {
options,
@ -52,7 +53,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let error: Error | null = $state(null);
const setError = (e: Error) => {
error = e;
tick().then(() => (error = e));
};
let term: Terminal | undefined = $state(undefined);