Permalink
Browse files

WSH: Convert numeric parameters to numbers

For some reason, WSH wrapper was passing numeric parameters as
strings and JSHint couldn't understand them. This patch converts
to numbers all parameters that can be converted.

Fixes GH-671.
  • Loading branch information...
valueof committed Oct 13, 2012
1 parent 56a3cd9 commit c6058c05c04f98b974af56a7cb46d56d8d13cba6
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/platforms/wsh.js
View
@@ -223,6 +223,9 @@
}
} else {
options[option] = value === "true" ? true : value === "false" ? false : value;
+ if (!isNaN(Number(value))) {
+ options[option] = parseInt(value, 10);
+ }
}
}

0 comments on commit c6058c0

Please sign in to comment.