fix(core): the down arrow may show when showLinkedDoc not configured (#13220)

The original setting object on user's device not defined, so the default
value `true` won't work.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved reliability of sidebar and appearance settings by ensuring
toggle switches consistently reflect the correct on/off state.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Cats Juice
2025-07-15 17:32:10 +08:00
committed by GitHub
parent 8e374f5517
commit 339ecab00f
2 changed files with 2 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ export const NavigationPanelDocNode = ({
extractEmojiAsIcon={enableEmojiIcon}
collapsed={isCollapsed}
setCollapsed={setCollapsed}
collapsible={appSettings.showLinkedDocInSidebar}
collapsible={!!appSettings.showLinkedDocInSidebar}
canDrop={handleCanDrop}
to={`/${docId}`}
onClick={() => {

View File

@@ -181,7 +181,7 @@ export const AppearanceSettings = () => {
]()}
>
<Switch
checked={appSettings.showLinkedDocInSidebar}
checked={!!appSettings.showLinkedDocInSidebar}
onChange={checked =>
updateSettings('showLinkedDocInSidebar', checked)
}