We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f366f0 commit de1dca6Copy full SHA for de1dca6
src/runtime/utils/refreshHandler.ts
@@ -73,8 +73,8 @@ export class DefaultRefreshHandler implements RefreshHandler {
73
// Listen for when the page is visible, if the user switches tabs
74
// and makes our tab visible again, re-fetch the session, but only if
75
// this feature is not disabled.
76
- if (this.config?.enableOnWindowFocus && document.visibilityState === 'visible') {
77
- this.auth?.refresh()
+ if (this.config?.enableOnWindowFocus && document.visibilityState === 'visible' && this.auth?.data.value) {
+ this.auth.refresh()
78
}
79
80
0 commit comments