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 #2

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.