get rid of usages of substr which is deprecated
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ const timeDeltaToLabel = (delta: TimeDelta): string => {
|
||||
let label = '';
|
||||
const date = new Date(0);
|
||||
date.setSeconds(delta.seconds);
|
||||
const time = date.toISOString().substr(11, 8);
|
||||
const time = date.toISOString().slice(11, 11 + 8);
|
||||
if (delta.days === 0) {
|
||||
label = `${time}`;
|
||||
} else if (delta.days === 1) {
|
||||
|
||||
Reference in New Issue
Block a user