Sugar
Sugar copied to clipboard
Array.max seems to have trouble with empty strings - Cannot compare with undefined
The following code throws an "Cannot compare with undefined" error
test = ['', 'AAAA', 'hello world', 'b']
test.max('length')
This works, the issue is with the empty string:
test = ['AAAA', 'hello world', 'b']
test.max('length')
Sorry for the delay here... this was a bug and I've put in a fix. Thanks!