From 0a6fb464f44bc4db242183ad137e9f80f793ec62 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 20 Feb 2016 17:16:53 +0000 Subject: Fix bug in #2001. We were incorrectly setting `options.count` to `NaN` if there was no command option. --- background_scripts/commands.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 01eecd81..d247425a 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -85,7 +85,8 @@ Commands = # We parse any `count` option immediately (to avoid having to parse it repeatedly later). unless @availableCommands[command].noRepeat - options.count = try Math.max 1, parseInt options.count + if /^[1-9]/.test options.count + options.count = parseInt options.count options -- cgit v1.2.3