grex icon indicating copy to clipboard operation
grex copied to clipboard

isFloat() returns true for some GUIDs

Open FarzadT opened this issue 10 years ago • 1 comments

In argument.js, isFloat() returns true for the following string "865fe326-2d1c-44a6-8719-d3c108fd649f"

FarzadT avatar Aug 28 '14 17:08 FarzadT

I think the solution would be to check for

    // Handle ids that are not numbers but pass parseFloat test
    // (ie. Titan edge ids)
    if (_.isString(argument) && this.isFloat()) {
      return "'" + argument + "'";
    }

before

    if (this.isFloat()) {
      return this.value;
    }

FarzadT avatar Aug 28 '14 17:08 FarzadT