mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user