1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-07 19:07:45 +01:00

fix(safari): make sure to return from bespoke reload clause (#12661)

On https://github.com/bitwarden/clients/pull/12326 I refactored and
extended a bit of special case logic for process reloads on Safari. This
appears to have caused a regression, and I think it's because I didn't
return from the function when Safari reloads. This makes it still call
`chrome.runtime.reload()`, which makes Safari send an "install" event,
which leads to our extension opening it's Getting Started page.

This commit returns after the location reload in Safari. This is tricky
to test locally as the issue does not appear with sideloaded apps. I'll
test it with Testflight!
This commit is contained in:
Addison Beck 2025-01-02 14:46:31 -05:00 committed by GitHub
parent 5a3681655b
commit 0ae10f0d9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -458,7 +458,7 @@ export class BrowserApi {
// and that prompts us to show a new tab, this apparently doesn't happen on sideloaded
// extensions and only shows itself production scenarios. See: https://bitwarden.atlassian.net/browse/PM-12298
if (this.isSafariApi) {
self.location.reload();
return self.location.reload();
}
return chrome.runtime.reload();
}