fix: prevent blocks lazy loading when no chat selected

This commit is contained in:
niceandneat
2025-05-04 21:24:56 +09:00
parent bf55f77e0d
commit a148e07ad1

View File

@@ -51,6 +51,7 @@
}
$effect(() => {
if($selectedCharID < 0) return
if(blocks.length-10 < DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].message.length){
blocks = new Uint8Array(blocks.length + 500)
for(let i=0;i<500;i++){