Skip to content

Commit

Permalink
fix: do not proxify class instances in forge config (#3039)
Browse files Browse the repository at this point in the history
* fix: do not proxify class instances in forge config

* spec: fix config tests
  • Loading branch information
MarshallOfSound authored Nov 1, 2022
1 parent e490ffc commit a89ed7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/core/src/util/forge-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const proxify = <T extends ProxiedObject>(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];
Expand Down

0 comments on commit a89ed7d

Please sign in to comment.