Skip to content

Commit

Permalink
toString the value before testing decimal
Browse files Browse the repository at this point in the history
If the value contains an actual number, `includes` will fail.  Forcibly
convert to a numeric type.
  • Loading branch information
ethomson committed Sep 21, 2018
1 parent 9aaea2e commit e3c8624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@

function decimalPressed()
{
if (getValue().includes('.')) {
if (getValue().toString().includes('.')) {
return;
}

Expand Down

0 comments on commit e3c8624

Please sign in to comment.