make all numbers truthy

This commit is contained in:
2021-01-24 11:53:58 -07:00
parent 9cf520bd3a
commit d54297c373
2 changed files with 3 additions and 4 deletions

View File

@@ -225,7 +225,6 @@ class Prelude {
public static dynamic function truthy(v:Any) {
return switch (Type.typeof(v)) {
case TNull: false;
case TInt | TFloat: (v : Float) > 0;
case TBool: (v : Bool);
default:
// Empty strings are falsy