Skip to content

TypeError: Cannot read property 'humanize' of undefined #116

@Nantris

Description

@Nantris

It seems really weird, because simpleFormat works fine, but humanizeLength invariably fails with the error TypeError: Cannot read property 'humanize' of undefined

const getText = timeToAdd => {
  const now = moment();
  const reminderTime = moment().add(timeToAdd, 'minutes');
  const range = now.twix(reminderTime.format()); //  range is a time span from the current time to the reminderTime
   const humanized = range.humanizeLength();  //  Fails with "TypeError: Cannot read property 'humanize' of undefined"
  // const humanized = range.simpleFormat();  //  Works fine
  return humanized;
};

Any thoughts? Thanks for this great project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions