Skip to content

Commit 8aab3a7

Browse files
committed
fix(tests): Only refresh page on cancelSync if it's background.html
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 5f1ad70 commit 8aab3a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/Account.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export default class Account {
382382

383383
async cancelSync():Promise<void> {
384384
if (!this.syncing) return
385-
if (self.constructor.name !== 'ServiceWorkerGlobalScope') {
385+
if (self.constructor.name !== 'ServiceWorkerGlobalScope' && window.location.toString().includes('background.html')) {
386386
// If we're running in a static background page
387387
// reload
388388
// eslint-disable-next-line @typescript-eslint/ban-ts-comment

0 commit comments

Comments
 (0)