Handle NULL created column of api_tokens table

This commit is contained in:
Daisuke Taniwaki
2018-06-02 23:55:21 +09:00
parent 784e5aa4ee
commit 690b07982e
2 changed files with 9 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ require(["jquery", "jhapi", "moment"], function($, JHAPI, moment) {
// convert ISO datestamps to nice momentjs ones
el = $(el);
let m = moment(new Date(el.text().trim()));
el.text(m.isValid() ? m.fromNow() : "Never");
el.text(m.isValid() ? m.fromNow() : el.text());
});
$("#request-token-form").submit(function() {