Skip to content

Commit b72a4ea

Browse files
committed
Fix some problems by overtaking data from the server on creation
in case it was changed
1 parent 3cccd0c commit b72a4ea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib/Account.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ export default class Account {
185185
// ignore this bookmark as it's not supported by the server
186186
return
187187
}
188-
bookmark.id = serverMark.id
189-
await this.storage.addToMappings(bookmark)
190-
await this.storage.addToCache(bookmark.localId, await serverMark.hash())
188+
serverMark.localId = bookmark.localId
189+
await this.tree.updateNode(serverMark)
190+
await this.storage.addToMappings(serverMark)
191+
await this.storage.addToCache(serverMark.localId, await serverMark.hash())
191192
},
192193
BATCH_SIZE
193194
)

0 commit comments

Comments
 (0)