mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
fix: handle empty date in human time format
This commit is contained in:
@@ -107,6 +107,9 @@ angular
|
||||
})
|
||||
.filter("humanTime", function () {
|
||||
return function humanTime(seconds) {
|
||||
if (!seconds) {
|
||||
return "never";
|
||||
}
|
||||
if (seconds instanceof Date)
|
||||
seconds = Math.round((Date.now() - seconds) / 1000);
|
||||
if (typeof seconds == "string")
|
||||
|
||||
Reference in New Issue
Block a user