mirror of
https://github.com/paricafe/misskey.git
synced 2025-02-16 07:17:28 -06:00
fix: prevent undefined history caused edit fail
undefined !== -1
This commit is contained in:
parent
7dc31a3ac1
commit
54b2449bf2
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ export class NoteUpdateService {
|
|||
throw new Error('update time is required');
|
||||
}
|
||||
|
||||
if (note.history?.findIndex(h => h.createdAt === ps.updatedAt?.toISOString()) !== -1) {
|
||||
if (note.history && note.history.findIndex(h => h.createdAt === ps.updatedAt?.toISOString()) !== -1) {
|
||||
// Same history already exists, skip this
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue