diff --git a/src/lib/SideBars/LoreBook/LoreBookList.svelte b/src/lib/SideBars/LoreBook/LoreBookList.svelte index f65e26b4..a2fda8e4 100644 --- a/src/lib/SideBars/LoreBook/LoreBookList.svelte +++ b/src/lib/SideBars/LoreBook/LoreBookList.svelte @@ -40,7 +40,9 @@ }) $CurrentCharacter.globalLore = newLore } - stb.destroy() + try { + stb.destroy() + } catch (error) {} sorted += 1 await sleep(1) createStb() @@ -55,7 +57,9 @@ const onOpen = () => { opened += 1 if(stb){ - stb.destroy() + try { + stb.destroy() + } catch (error) {} } } const onClose = () => { @@ -67,7 +71,9 @@ onDestroy(() => { if(stb){ - stb.destroy() + try { + stb.destroy() + } catch (error) { } } }) diff --git a/src/lib/SideBars/Scripts/RegexList.svelte b/src/lib/SideBars/Scripts/RegexList.svelte index f2b684b4..e026d17c 100644 --- a/src/lib/SideBars/Scripts/RegexList.svelte +++ b/src/lib/SideBars/Scripts/RegexList.svelte @@ -21,7 +21,9 @@ newValue.push(value[i]) }) value = newValue - stb.destroy() + try { + stb.destroy() + } catch (error) {} sorted += 1 await sleep(1) createStb() @@ -33,7 +35,9 @@ const onOpen = () => { opened += 1 if(stb){ - stb.destroy() + try { + stb.destroy() + } catch (error) {} } } const onClose = () => { @@ -47,7 +51,9 @@ onDestroy(() => { if(stb){ - stb.destroy() + try { + stb.destroy() + } catch (error) {} } }) diff --git a/src/lib/SideBars/SideChatList.svelte b/src/lib/SideBars/SideChatList.svelte index e570f503..776a50b9 100644 --- a/src/lib/SideBars/SideChatList.svelte +++ b/src/lib/SideBars/SideChatList.svelte @@ -39,7 +39,9 @@ }) chara.chats = newValue chara.chatPage = newChatPage - stb.destroy() + try { + stb.destroy() + } catch (error) {} sorted += 1 await sleep(1) createStb() @@ -52,7 +54,9 @@ onDestroy(() => { if(stb){ - stb.destroy() + try { + stb.destroy() + } catch (error) {} } })