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
For example, replace the above line with the following: timeEl.innerHTML = moment.duration(Number(timeInTraffic), "seconds").humanize();
Posting as an issue instead of a pull request since the owner seems to have abandoned this repo, and also because your solution may vary based on your preference.
Hope this saves someone else some time.
The text was updated successfully, but these errors were encountered:
Spent several hours figuring out why it would only show "Loading..."
Narrowed it down to this line:
https://github.com/jclarke0000/MMM-MyCommute/blob/master/MMM-MyCommute.js#L289
Turns out moment.duration(...).format is not a function. Not sure how/if this ever worked.
What you can do instead that is similar is use .humanize()
https://momentjs.com/docs/#/durations/humanize/
For example, replace the above line with the following:
timeEl.innerHTML = moment.duration(Number(timeInTraffic), "seconds").humanize();
Posting as an issue instead of a pull request since the owner seems to have abandoned this repo, and also because your solution may vary based on your preference.
Hope this saves someone else some time.
The text was updated successfully, but these errors were encountered: