Default to true

This commit is contained in:
Zhuoran 2024-08-04 11:33:20 +08:00
parent 948d29b676
commit 482a7723b2

View File

@ -146,7 +146,7 @@
await tick(); await tick();
if ($settings.scrollOnBranchChange) { if ($settings?.scrollOnBranchChange ?? true) {
const element = document.getElementById('messages-container'); const element = document.getElementById('messages-container');
autoScroll = element.scrollHeight - element.scrollTop <= element.clientHeight + 50; autoScroll = element.scrollHeight - element.scrollTop <= element.clientHeight + 50;
@ -197,7 +197,7 @@
await tick(); await tick();
if ($settings.scrollOnBranchChange) { if ($settings?.scrollOnBranchChange ?? true) {
const element = document.getElementById('messages-container'); const element = document.getElementById('messages-container');
autoScroll = element.scrollHeight - element.scrollTop <= element.clientHeight + 50; autoScroll = element.scrollHeight - element.scrollTop <= element.clientHeight + 50;