diff --git a/src/plugins/expressions/common/executor/executor.ts b/src/plugins/expressions/common/executor/executor.ts index c7c4b2238f297..4b953db4ea820 100644 --- a/src/plugins/expressions/common/executor/executor.ts +++ b/src/plugins/expressions/common/executor/executor.ts @@ -152,15 +152,11 @@ export class Executor = Record { - if (namespace) { - const fns = Object.entries(this.container.get().functions); - const filtered = fns.filter( - ([key, value]) => !value.namespace || value.namespace === namespace - ); - return Object.fromEntries(filtered); - } else { - return { ...this.container.get().functions }; - } + const fns = Object.entries(this.container.get().functions); + const filtered = fns.filter( + ([key, value]) => !value.namespace || value.namespace === namespace + ); + return Object.fromEntries(filtered); } public registerType(