From 7521c6121ec0523795c97ec5c422c3b6d6024dd8 Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Wed, 22 Sep 2021 17:39:45 +1000 Subject: [PATCH] fix: Verifier now accepts explicitly setting options to undefined (it will ignore and warn). This fixes a regression introduced in beta-45 --- src/ffi/argumentMapper/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ffi/argumentMapper/index.ts b/src/ffi/argumentMapper/index.ts index c8bef5e4..1283b730 100644 --- a/src/ffi/argumentMapper/index.ts +++ b/src/ffi/argumentMapper/index.ts @@ -14,6 +14,12 @@ export const argumentMapper = ( } return []; } + if (options[key] === undefined) { + logger.warn( + `The Verifier option '${key}' was was explicitly set to undefined and will be ignored. This may indicate an error in your config. Remove the option entirely to prevent this warning` + ); + return []; + } if (argMapping[key].warningMessage) { logger.warn(argMapping[key].warningMessage); return [];