diff --git a/lib/api/protocol/moveTo.js b/lib/api/protocol/moveTo.js index 95aa38bc3b..9f21b71eca 100644 --- a/lib/api/protocol/moveTo.js +++ b/lib/api/protocol/moveTo.js @@ -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'); }