mirror of
https://github.com/docmost/docmost.git
synced 2026-08-29 10:05:03 +08:00
fix: preserve sidebar title/icon on partial page updates
This commit is contained in:
@@ -455,7 +455,11 @@ export function invalidateOnUpdatePage(
|
|||||||
...page,
|
...page,
|
||||||
items: page.items.map((sidebarPage: IPage) =>
|
items: page.items.map((sidebarPage: IPage) =>
|
||||||
sidebarPage.id === id
|
sidebarPage.id === id
|
||||||
? { ...sidebarPage, title: title, icon: icon }
|
? {
|
||||||
|
...sidebarPage,
|
||||||
|
...(title !== undefined ? { title } : {}),
|
||||||
|
...(icon !== undefined ? { icon } : {}),
|
||||||
|
}
|
||||||
: sidebarPage,
|
: sidebarPage,
|
||||||
),
|
),
|
||||||
})),
|
})),
|
||||||
|
|||||||
Reference in New Issue
Block a user