utility.presence: fix for activities that send empty timestamp objects
*cough* tower unite *cough*
This commit is contained in:
parent
c699c04717
commit
d666a194c0
|
@ -838,7 +838,10 @@ presence.callback = async function (msg, line) {
|
||||||
descLines.push(
|
descLines.push(
|
||||||
formatTime(activity.timestamps.end - Date.now()) + " remaining"
|
formatTime(activity.timestamps.end - Date.now()) + " remaining"
|
||||||
);
|
);
|
||||||
} else {
|
} else if (
|
||||||
|
activity.timestamps.start != null &&
|
||||||
|
activity.timestamps.end != null
|
||||||
|
) {
|
||||||
const position = Date.now() - activity.timestamps.start;
|
const position = Date.now() - activity.timestamps.start;
|
||||||
const length = activity.timestamps.end - activity.timestamps.start;
|
const length = activity.timestamps.end - activity.timestamps.start;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue