Browse Source

fix(core): Fix argsArrayToHash, case where arg not present in this.args (#1224)

nemo-js 4 years ago
parent
commit
454fdf5c29
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/core/src/common/configurable-operation.ts

+ 1 - 1
packages/core/src/common/configurable-operation.ts

@@ -402,7 +402,7 @@ export class ConfigurableOperationDef<T extends ConfigArgs = ConfigArgs> {
     protected argsArrayToHash(args: ConfigArg[]): ConfigArgValues<T> {
     protected argsArrayToHash(args: ConfigArg[]): ConfigArgValues<T> {
         const output: ConfigArgValues<T> = {} as any;
         const output: ConfigArgValues<T> = {} as any;
         for (const arg of args) {
         for (const arg of args) {
-            if (arg && arg.value != null) {
+            if (arg && arg.value != null && this.args[arg.name] != null) {
                 output[arg.name as keyof ConfigArgValues<T>] = coerceValueToType<T>(
                 output[arg.name as keyof ConfigArgValues<T>] = coerceValueToType<T>(
                     arg.value,
                     arg.value,
                     this.args[arg.name].type,
                     this.args[arg.name].type,