fix(electron): incorrect db rows docId when doing trim (#7008)

This commit is contained in:
pengx17
2024-05-21 13:53:16 +00:00
parent f05b51ab49
commit 96cdb041c6

View File

@@ -107,7 +107,7 @@ export class WorkspaceSQLiteDB {
logger.debug(`trim ${this.workspaceId}:${dbID} ${count}`);
const updates = await this.adapter.getUpdates(dbID);
const update = mergeUpdate(updates.map(row => row.data));
const insertRows = [{ data: update, dbID }];
const insertRows = [{ data: update, docId: dbID }];
await this.adapter?.replaceUpdates(dbID, insertRows);
logger.debug(`trim ${this.workspaceId}:${dbID} successfully`);
return update;