Skip to content

Commit

Permalink
invalid parameter case handled
Browse files Browse the repository at this point in the history
  • Loading branch information
harshit-bs committed Jan 16, 2023
1 parent cc9225a commit 450f93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api/protocol/moveTo.js
Expand Up @@ -54,7 +54,7 @@ module.exports = class Command extends ProtocolAction {
} else if (args.length === 2 && isNumber(args[0]) && !isNaN(args[0]) && isNumber(args[1]) && !isNaN(args[1])) {
xoffset = args[0];
yoffset = args[1];
} else if (args.length > 2 && (args.length > 0 && (args[0] !== null || args[1] !== null))) {
} else if (args.length > 2 || (args.length > 0 && (args[0] !== null || args[1] !== null))) {
throw new Error('Invalid Parameters for moveTo Command');
}

Expand Down

0 comments on commit 450f93b

Please sign in to comment.