Skip to content

Commit

Permalink
fix: settings tab crashes with third party cookies blocked, fixes vue…
Browse files Browse the repository at this point in the history
  • Loading branch information
DKhalil committed Nov 3, 2019
1 parent f2efbe3 commit 27c7831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/app-frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ import { SPECIAL_TOKENS } from '@utils/util'
import Keyboard from '@front/mixins/keyboard'
import GroupDropdown from '@front/components/GroupDropdown.vue'
import { SETTINGS_VERSION_ID, SETTINGS_VERSION } from '@front/views/settings/SettingsTab.vue'
import * as storage from '@utils/storage'
export default {
name: 'App',
Expand Down Expand Up @@ -226,7 +227,7 @@ export default {
{ name: 'router', label: 'History', icon: 'directions' },
{ name: 'routes', label: 'Routes', icon: 'book' }
],
settingsVersion: parseInt(localStorage.getItem(SETTINGS_VERSION_ID))
settingsVersion: parseInt(storage.get(SETTINGS_VERSION_ID))
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/app-frontend/src/views/settings/SettingsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<script>
import GlobalPreferences from './GlobalPreferences.vue'
import { mapState } from 'vuex'
import * as storage from '@utils/storage'
export const SETTINGS_VERSION = 3
export const SETTINGS_VERSION_ID = 'vue-devtools-settings-version'
Expand All @@ -17,7 +18,7 @@ export default {
provide () {
return {
settingsVersion: SETTINGS_VERSION,
currentSettingsVersion: parseInt(localStorage.getItem(SETTINGS_VERSION_ID)) || 0
currentSettingsVersion: parseInt(storage.get(SETTINGS_VERSION_ID, 0))
}
},
Expand Down

0 comments on commit 27c7831

Please sign in to comment.