mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-29 10:09:26 +02:00
core: handle unknown collection types in sync (#9878)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
@@ -400,6 +400,16 @@ export class Sync {
|
||||
}
|
||||
|
||||
const collectionType = SYNC_COLLECTIONS_MAP[itemType];
|
||||
|
||||
if (!collectionType) {
|
||||
this.logger.error(
|
||||
new Error(
|
||||
`Unknown collection type for item type ${itemType}. Skipping chunk.`
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const collection = this.db[collectionType].collection;
|
||||
const localItems = await collection.records(chunk.items.map((i) => i.id));
|
||||
let items: (MaybeDeletedItem<Item> | undefined)[] = [];
|
||||
|
||||
Reference in New Issue
Block a user