Skip to content

Commit

Permalink
Calculator: Fixed decimals (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Sep 9, 2016
1 parent 1afe4bd commit 25b78e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/packages/default/Calculator/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
var output = (function() {
// Kudos http://codepen.io/GeoffStorbeck/pen/zxgaqw

if ( !isNaN(val) || val === '.' ) { // Number
self.temp += val;
if ( !isNaN(val) || val === 'dec' ) { // Number
self.temp += val === 'dec' ? ops[val] : val;

return self.temp.substring(0,10);
} else if ( val === 'AC' ) { // Clear
Expand Down

0 comments on commit 25b78e1

Please sign in to comment.