Skip to content

Commit

Permalink
Removed not used check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuznietsov committed May 3, 2022
1 parent b41f51d commit 2906aef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/plugins/expressions/common/execution/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ export class Execution<
);

// Check for missing required arguments.
for (const { aliases, default: argDefault, name, required } of Object.values(argDefs)) {
for (const { default: argDefault, name, required } of Object.values(argDefs)) {
if (!(name in dealiasedArgAsts) && typeof argDefault !== 'undefined') {
dealiasedArgAsts[name] = [parse(argDefault as string, 'argument')];
}
Expand All @@ -490,9 +490,7 @@ export class Execution<
continue;
}

// use an alias if _ is the missing arg
const errorArg = name === '_' ? aliases[0] : name;
throw new Error(`${fnDef.name} requires an "${errorArg}" argument`);
throw new Error(`${fnDef.name} requires an "${name}" argument`);
}

// Create the functions to resolve the argument ASTs into values
Expand Down

0 comments on commit 2906aef

Please sign in to comment.