hustcc / timeago.js

:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.
https://timeago.org
MIT License
5.32k stars 410 forks source link

Handle empty node list #241

Closed gabalis closed 9 months ago

gabalis commented 3 years ago

Implementation of the fix suggested in issue #230 :

'Uncaught TypeError: node.getAttribute is not a function when passed an empty node list'

See https://github.com/hustcc/timeago.js/issues/230