fix breaking bug
This commit is contained in:
parent
e9c852ac33
commit
1de824be6b
2 changed files with 3 additions and 2 deletions
|
@ -641,7 +641,7 @@ class Message extends SnowFlake{
|
|||
}
|
||||
let now:string;
|
||||
let yesterdayStr:string;
|
||||
updateTimes();
|
||||
|
||||
function formatTime(date:Date){
|
||||
updateTimes();
|
||||
const datestring=date.toLocaleDateString();
|
||||
|
@ -657,6 +657,7 @@ function formatTime(date:Date){
|
|||
}
|
||||
const d = new Date();
|
||||
let tomorrow=d.setHours(24,0,0,0);
|
||||
updateTimes();
|
||||
function updateTimes(){
|
||||
if(tomorrow<Date.now()){
|
||||
tomorrow=d.setHours(24,0,0,0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue