From 96d32afa51b54d03dca391407f96e5c4882e78a3 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sun, 1 Aug 2021 19:18:14 +0200 Subject: [PATCH] fix: :bug: Initialise jugglLinks as empty array so that it always has .length It was initialised as undefined, previously --- src/sharedFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sharedFunctions.ts b/src/sharedFunctions.ts index 69905db2..e0b003d7 100644 --- a/src/sharedFunctions.ts +++ b/src/sharedFunctions.ts @@ -214,7 +214,7 @@ export async function getNeighbourObjArr( splitAndTrim(childFieldName), ]; - let jugglLinks: JugglLink[]; + let jugglLinks: JugglLink[] = []; if (plugin.app.plugins.plugins.juggl !== undefined) { jugglLinks = await getJugglLinks(plugin.app, plugin.settings); }