Skip to content

Commit

Permalink
fix tab update
Browse files Browse the repository at this point in the history
  • Loading branch information
CurryYangxx committed Jan 6, 2025
1 parent e4f22a5 commit 57edf80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/insomnia/src/ui/components/tabs/tabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = ''
}
}, [closeAllTabsUnderProject, closeAllTabsUnderWorkspace, closeTabById]);

const handleUpdate = useCallback(async (doc: models.BaseModel, patches: Partial<models.BaseModel>[]) => {
const handleUpdate = useCallback(async (doc: models.BaseModel, patches: Partial<models.BaseModel>[] = []) => {
const patchObj: Record<string, any> = {};
patches.forEach(patch => {
Object.assign(patchObj, patch);
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 57edf80

Please sign in to comment.