agenda / human-interval

Human readable time distances for javascript
Other
459 stars 13 forks source link

Fixed a bug with commas, all tests are now passing #1

Closed CapacitorSet closed 9 years ago

CapacitorSet commented 9 years ago

The module had a bug where it would fail on strings like "1 hour, 8 minutes ago", because of the comma. This happened because it called processUnits on an empty string, so I just added a check that skips processUnits when the string is null.

rschmukler commented 9 years ago

@CapacitorSet why close this?

CapacitorSet commented 9 years ago

@rschmukler sorry, I should have left a note. I intended my pull request to contain only one commit (the one fixing the bug with commas), but I accidentally put another commit in too. See, this is my first time doing a pull request :/

As soon as I'm home I'll fix this and post a proper pull request.