prevent markdown crash

This commit is contained in:
MathMan05
2026-05-11 12:08:07 -05:00
parent f70be8280b
commit 92ad2122bc
+3 -4
View File
@@ -772,13 +772,12 @@ class MarkDown {
break;
}
}
const parts = build.join("").match(/^<t:([0-9]{1,16})(:([tTdDfFR]))?>$/);
if (found) {
if (found && parts) {
appendcurrent();
i = j;
const parts = build
.join("")
.match(/^<t:([0-9]{1,16})(:([tTdDfFR]))?>$/) as RegExpMatchArray;
const dateInput = new Date(Number.parseInt(parts[1]) * 1000);
let time = "";
if (Number.isNaN(dateInput.getTime())) time = build.join("");