From c46a9e4b762b11b478e45d6a4cdc3722361dcdee Mon Sep 17 00:00:00 2001 From: Danny Hinshaw Date: Tue, 8 Aug 2023 03:01:00 -0400 Subject: [PATCH] sync: fix the broken history snapshot "restore" functionality by importing db. (#6234) refs #6232 --- .../insomnia/src/ui/components/modals/sync-history-modal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/insomnia/src/ui/components/modals/sync-history-modal.tsx b/packages/insomnia/src/ui/components/modals/sync-history-modal.tsx index 0db8d2409..3f4b4cb87 100644 --- a/packages/insomnia/src/ui/components/modals/sync-history-modal.tsx +++ b/packages/insomnia/src/ui/components/modals/sync-history-modal.tsx @@ -3,6 +3,7 @@ import { OverlayContainer } from 'react-aria'; import { useRouteLoaderData } from 'react-router-dom'; import * as session from '../../../account/session'; +import { database as db } from '../../../common/database'; import type { Snapshot } from '../../../sync/types'; import { VCS } from '../../../sync/vcs/vcs'; import { WorkspaceLoaderData } from '../../routes/workspace'; @@ -95,8 +96,7 @@ export const SyncHistoryModal = ({ vcs, branch, history, onHide }: Props) => { className="btn btn--micro btn--outlined" onClick={async () => { const delta = await vcs.rollback(snapshot.id, syncItems); - // @ts-expect-error -- TSCONVERSION - await db.batchModifyDocs(delta); + await db.batchModifyDocs(delta as any); }} > Restore