From 911ae77011b1faf69c4308fba05fcd0fc68bdac9 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 3 May 2021 18:39:36 +0930 Subject: [PATCH] fix: ensure processChange has new varState values --- app/core/watchers/registration.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/core/watchers/registration.ts b/app/core/watchers/registration.ts index 76b074b5d..f2b50a94b 100644 --- a/app/core/watchers/registration.ts +++ b/app/core/watchers/registration.ts @@ -12,6 +12,9 @@ import { getKeyFile, sleep } from '../utils'; import { bus } from '../bus'; const processChange = async function () { + // Wait 100ms to ensure varState has settled with the new value + await sleep(100); + logger.debug(varState.data.regFile ? `Checking "${varState.data.regFile}" for the key file.` : 'No key file found.'); // Get key file