You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def self.standardize_to_milliseconds(value)
return standardize_float_to_milliseconds(value.to_f) if value.to_f.to_s == value.to_s
return standardize_string_to_milliseconds(value)
value
end
doesn't work if value has a trailing zero (e.g. 123.450) and it will return a string instead of an integer.
Here's a suggested fix:
return standardize_float_to_milliseconds(value.to_f) if value =~ /^\d+\.?\d*$/
The text was updated successfully, but these errors were encountered:
This
doesn't work if value has a trailing zero (e.g.
123.450
) and it will return a string instead of an integer.Here's a suggested fix:
The text was updated successfully, but these errors were encountered: