Skip to content

Commit

Permalink
fix: be sure reload doesn't hit the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jan 19, 2024
1 parent 81333e6 commit 3d02733
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ import {
InclusionState,
} from 'zwave-js/safe'
import DialogNodesManager from '@/components/dialogs/DialogNodesManager.vue'
import { uuid } from './lib/utils'
let socketQueue = []
Expand Down Expand Up @@ -1128,7 +1129,8 @@ export default {
// needed to fix external auth issues #3427
const statusCode = error.response?.status
if ([302, 401].includes(statusCode)) {
location.reload()
// reload current page, be sure this doesn't hits cache, add a random query param
location.search = `?auth=${uuid()}`
return
}
setTimeout(() => (this.error = error.message), 1000)
Expand Down

0 comments on commit 3d02733

Please sign in to comment.