From 14ba8ae98eaec324afdc61a9797b87f537d49275 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sat, 19 Oct 2024 14:54:38 -0700 Subject: [PATCH] lint: fix unrelated issues --- src/backend/main.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/backend/main.ts b/src/backend/main.ts index ef7b038..ad3ed45 100644 --- a/src/backend/main.ts +++ b/src/backend/main.ts @@ -3,7 +3,7 @@ import { Producer, produce, consume } from '@ndn/endpoint' import { Name, Interest, Component } from '@ndn/packet' import * as nfdmgmt from '@ndn/nfdmgmt' -import { getYjsDoc} from '@syncedstore/core' +import { getYjsDoc } from '@syncedstore/core' import * as Y from 'yjs' import { CertStorage } from '@ucla-irl/ndnts-aux/security' import { RootDocStore, initRootDoc, project, profiles, connections } from './models' @@ -234,18 +234,17 @@ export async function bootstrapWorkspace(opts: { let targetSVEncoded = targetName.at(-1).value // load local state first with the snapshot. await persistStore.set('localState', targetSVEncoded) - - // Merge the SV with the local one so that when SyncAgent starts up, + + // Merge the SV with the local one so that when SyncAgent starts up, // it replays the local updates (in local storage), starting from snapshot's vector. - let localSVEncoded = await persistStore.get(aloSyncKey) + const localSVEncoded = await persistStore.get(aloSyncKey) if (localSVEncoded) { - let localSV = Decoder.decode(localSVEncoded, StateVector) - let targetSV = Decoder.decode(targetSVEncoded, StateVector) + const localSV = Decoder.decode(localSVEncoded, StateVector) + const targetSV = Decoder.decode(targetSVEncoded, StateVector) targetSV.mergeFrom(localSV) targetSVEncoded = Encoder.encode(targetSV) } await persistStore.set(aloSyncKey, targetSVEncoded) - } catch (err: any) { console.warn(err) console.log('Aborting snapshot retrieval, falling back to SVS')