Skip to content

Commit

Permalink
fix less operator bad evaluation when args are a mix of string and nu…
Browse files Browse the repository at this point in the history
…mber (#18)
  • Loading branch information
jinjaghost authored and diegoholiveira committed Oct 22, 2019
1 parent 723da1c commit b9fcc37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func less(a, b interface{}) bool {
if isNumber(a) {
if isNumber(a) || isNumber(b) {
return toNumber(b) > toNumber(a)
}

Expand Down

0 comments on commit b9fcc37

Please sign in to comment.