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 authored and GitHub committed 2025-07-15 09:32:10 +00:00
1 parent 8e374f5517
commit 339ecab00f
2 files changed
+2 -2

No files matched your search

@@ -252,7 +252,7 @@ export const NavigationPanelDocNode = ({
extractEmojiAsIcon={enableEmojiIcon}
collapsed={isCollapsed}
setCollapsed={setCollapsed}
collapsible={appSettings.showLinkedDocInSidebar}
collapsible={!!appSettings.showLinkedDocInSidebar}
canDrop={handleCanDrop}
to={`/${docId}`}
onClick={() => {
@@ -181,7 +181,7 @@ export const AppearanceSettings = () => {
]()}
>
<Switch
checked={appSettings.showLinkedDocInSidebar}
checked={!!appSettings.showLinkedDocInSidebar}
onChange={checked =>
updateSettings('showLinkedDocInSidebar', checked)
}