From 580563abe3bf2e50a73edb5a8027312376ba4b1d Mon Sep 17 00:00:00 2001 From: CytoDev Date: Wed, 13 Jul 2016 00:09:51 +0200 Subject: [PATCH] Should fix the off by one. --- mock/LightDMMock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mock/LightDMMock.js b/mock/LightDMMock.js index b4d8b00..d7d9066 100644 --- a/mock/LightDMMock.js +++ b/mock/LightDMMock.js @@ -404,8 +404,8 @@ window.deprecationNotifier = function(type, deprecated, alternative) { * @throws {IncompatibleArgumentTypesException} */ window.checkArguments = function(args, length, types) { - if(args.length -1 !== length) - throw new IncompatibleArgumentCountException(length, args.length -1); + if(args.length !== length) + throw new IncompatibleArgumentCountException(length, args.length); for(var i = 1; i <= types.length; i++) { if(typeof args[i] !== types[i-1])