Skip to content

Commit

Permalink
Fix comparisons with almost-floats. Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed May 3, 2019
1 parent c885db9 commit dae8874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion card-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class {
const lhs = this.parseTemplateString(str[1]);
const rhs = this.parseTemplateString(str[3]);
var expr = ''
if(!parseFloat(lhs))
if(parseFloat(lhs) != lhs)
expr = `"${lhs}" ${str[2]} "${rhs}"`;
else
expr = `${parseFloat(lhs)} ${str[2]} ${parseFloat(rhs)}`
Expand Down

0 comments on commit dae8874

Please sign in to comment.