From a89ed7d375dd3f39aa577f69a61acfb088a46d56 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 31 Oct 2022 18:02:05 -0700 Subject: [PATCH] fix: do not proxify class instances in forge config (#3039) * fix: do not proxify class instances in forge config * spec: fix config tests --- packages/api/core/src/util/forge-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/core/src/util/forge-config.ts b/packages/api/core/src/util/forge-config.ts index 842a27dd04..3f9768b025 100644 --- a/packages/api/core/src/util/forge-config.ts +++ b/packages/api/core/src/util/forge-config.ts @@ -28,7 +28,7 @@ const proxify = (buildIdentifier: string | (() => strin } for (const [key, val] of Object.entries(proxifiedObject)) { - if (typeof val === 'object' && key !== 'pluginInterface' && !(val instanceof RegExp)) { + if (typeof val === 'object' && (val.constructor === Object || val.constructor === Array) && key !== 'pluginInterface' && !(val instanceof RegExp)) { (newObject as any)[key] = proxify(buildIdentifier, (proxifiedObject as any)[key], `${envPrefix}_${underscoreCase(key)}`); } else { (newObject as any)[key] = (proxifiedObject as any)[key];