Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 90d79b2

Browse files
committed
Merge pull request #309 from telerik/totev/fix-command-parameters-validation
Fixes validation of hierarchical commands with too many arguments
2 parents 52e8914 + 4a1e516 commit 90d79b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/commands-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class CommandsService implements ICommandsService {
144144
var argument = _.find(commandArgsHelper.remainingArguments, c => mandatoryParam.validate(c).wait());
145145

146146
if(argument) {
147-
commandArgsHelper.remainingArguments = _.without(commandArgsHelper.remainingArguments, argument);
147+
helpers.remove(commandArgsHelper.remainingArguments, arg => arg === argument);
148148
}
149149
else {
150150
this.$errors.fail("Missing mandatory parameter.");

0 commit comments

Comments
 (0)