Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: TypeError: Cannot assign to read only property 'migrated' of object '#<Object>'

thecodrre32ace167d6e
diff --git a/packages/core/api/sync/collector.js b/packages/core/api/sync/collector.js
index cac356bca..d17f0672c 100644
--- a/packages/core/api/sync/collector.js
+++ b/packages/core/api/sync/collector.js
@@ -41,15 +41,14 @@ class Collector {
(item) => item.dateEdited > this._lastSyncedTimestamp || item.migrated
)
.map(async (item) => {
- // in case of resolved delta
- if (item.resolved) item.resolved = false;
- // turn the migrated flag off so we don't keep syncing this item repeated
- if (item.migrated) item.migrated = false;
-
return {
id: item.id,
v: CURRENT_DATABASE_VERSION,
- ...(await this._serialize(item)),
+ ...(await this._serialize({
+ ...item,
+ migrated: false,
+ resolved: false,
+ })),
};
})(array)
);