Skip to content

Commit 71b147e

Browse files
authored
Merge pull request #77 from pabigot/pabigot/20200704a
control: fix check if argument is number
2 parents 1cb3bfb + fd319d3 commit 71b147e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/control.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function parseConfig(config, options) {
77
c.badArgument(options);
88
}
99

10-
if (Number.isNaN(options.protocolVersion)) {
10+
if (Number.isNaN(Number(options.protocolVersion))) {
1111
c.badArgument(options);
1212
}
1313

@@ -66,7 +66,7 @@ async function set(config, options) {
6666
}
6767

6868
if (!options.rawValue) {
69-
if (!Number.isNaN(options.set)) {
69+
if (!Number.isNaN(Number(options.set))) {
7070
options.set = Number.parseInt(options.set, 10);
7171
} else if (options.set.toLowerCase() === 'true') {
7272
options.set = true;

0 commit comments

Comments
 (0)