From 8ab2de6fb7792deeb07907e4aa7cfe1a23c16713 Mon Sep 17 00:00:00 2001 From: Rushikesh Tote Date: Mon, 6 Jun 2022 19:22:02 +0530 Subject: [PATCH] fix undefined mappings at start --- src/utils/watch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/watch.ts b/src/utils/watch.ts index 5557f441c..3dcc36fac 100644 --- a/src/utils/watch.ts +++ b/src/utils/watch.ts @@ -58,7 +58,7 @@ export async function removeWatchMapping(collectionName: string) { } export function getWatchMappings() { - const mappings = watchStore.get('mappings'); + const mappings = watchStore.get('mappings') ?? []; return mappings; }