mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-24 07:29:30 +01:00
core: fix note history cleanup tests
This commit is contained in:
@@ -99,8 +99,8 @@ export class NoteHistory implements ICollection {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
private async cleanup(noteId: string) {
|
||||
const limit = await this.db.options.maxNoteVersions();
|
||||
private async cleanup(noteId: string, limit?: number) {
|
||||
limit = limit || (await this.db.options.maxNoteVersions());
|
||||
if (!limit) return;
|
||||
const history = await this.db
|
||||
.sql()
|
||||
|
||||
Reference in New Issue
Block a user