mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-05-25 12:04:10 +00:00
prevent markdown crash
This commit is contained in:
@@ -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("");
|
||||
|
||||
Reference in New Issue
Block a user