Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix: check if date is invalid

Ahmad Karlamf96e3f7a290e
diff --git a/webroot/js/utils/chat.js b/webroot/js/utils/chat.js
index 638f3964cb..f63890ac67 100644
--- a/webroot/js/utils/chat.js
+++ b/webroot/js/utils/chat.js
@@ -281,6 +281,9 @@ export function convertOnPaste( event = { preventDefault() {} }) {
export function formatTimestamp(sentAt) {
sentAt = new Date(sentAt);
+ if (isNaN(sentAt)) {
+ return '';
+ }
let diffInDays = ((new Date()) - sentAt) / (24 * 3600 * 1000);
if (diffInDays >= 1) {