fix: prevent blocks lazy loading when no chat selected
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
if($selectedCharID < 0) return
|
||||||
if(blocks.length-10 < DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].message.length){
|
if(blocks.length-10 < DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].message.length){
|
||||||
blocks = new Uint8Array(blocks.length + 500)
|
blocks = new Uint8Array(blocks.length + 500)
|
||||||
for(let i=0;i<500;i++){
|
for(let i=0;i<500;i++){
|
||||||
|
|||||||
Reference in New Issue
Block a user