aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-02-20 17:16:53 +0000
committerStephen Blott2016-02-20 17:16:53 +0000
commit0a6fb464f44bc4db242183ad137e9f80f793ec62 (patch)
tree1c0889dfeed6aa19d66c024ffcbaf758f8af3f0a
parent4244dc029540e941b8ab999365b9851dfdf0f32a (diff)
downloadvimium-0a6fb464f44bc4db242183ad137e9f80f793ec62.tar.bz2
Fix bug in #2001.
We were incorrectly setting `options.count` to `NaN` if there was no command option.
-rw-r--r--background_scripts/commands.coffee3
1 files changed, 2 insertions, 1 deletions
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