From 70e7619ad56009dc3a23dcfdd80a1e1d5c4b7fdf Mon Sep 17 00:00:00 2001 From: Curry Yang <1019yanglu@gmail.com> Date: Mon, 9 Dec 2024 15:37:23 +0800 Subject: [PATCH] fix tab update --- packages/insomnia/src/ui/components/tabs/tabList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/insomnia/src/ui/components/tabs/tabList.tsx b/packages/insomnia/src/ui/components/tabs/tabList.tsx index cc7e283afc0..6c1885e0152 100644 --- a/packages/insomnia/src/ui/components/tabs/tabList.tsx +++ b/packages/insomnia/src/ui/components/tabs/tabList.tsx @@ -104,7 +104,7 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = '' } }, [closeAllTabsUnderProject, closeAllTabsUnderWorkspace, closeTabById]); - const handleUpdate = useCallback(async (doc: models.BaseModel, patches: Partial[]) => { + const handleUpdate = useCallback(async (doc: models.BaseModel, patches: Partial[] = []) => { const patchObj: Record = {}; patches.forEach(patch => { Object.assign(patchObj, patch); @@ -181,6 +181,7 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = '' useEffect(() => { // sync tabList with database const callback = async (changes: ChangeBufferEvent[]) => { + console.log('tabList changes:', changes); for (const change of changes) { const changeType = change[0]; const doc = change[1];