Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit d63759b

Browse files
committed
Merge pull request #9407 from brave/fix/9308-followup
follow ups to fix for #9308
1 parent 6398998 commit d63759b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

app/sessionStore.js

+4
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ module.exports.cleanAppData = (data, isShutdown) => {
296296
if (data.dragData) {
297297
delete data.dragData
298298
}
299+
if (data.sync) {
300+
// clear sync site cache
301+
data.sync.objectsById = {}
302+
}
299303
const clearSiteSettings = isShutdown && getSetting(settings.SHUTDOWN_CLEAR_SITE_SETTINGS) === true
300304
if (clearSiteSettings) {
301305
data.siteSettings = {}

app/sync.js

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ const appStoreChangeCallback = function (diffs) {
9595
const entry = state.getIn(statePath)
9696
const isSite = type === 'sites'
9797

98+
if (action === writeActions.CREATE && entry && entry.get('skipSync')) {
99+
// Don't re-create objects that were fetched by sync
100+
return
101+
}
102+
98103
if (isSite && action === writeActions.DELETE && !entry) {
99104
// If we deleted the site, it is no longer availble in appState.
100105
// Find the corresponding objectId using the sync cache

0 commit comments

Comments
 (0)