Skip to content

Commit

Permalink
Update addNetworkAndInstallAlerts.js
Browse files Browse the repository at this point in the history
  • Loading branch information
DellZHackintosh committed Jul 7, 2024
1 parent b7bed34 commit c39aba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/forum/addNetworkAndInstallAlerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default () => {
app.cache.pwaOfflineAlert = app.alerts.show(app.translator.trans('askvortsov-pwa.forum.alerts.offline'));
});

if (app.forum.attribute('installAlerts') && !localStorage.getItem('askvortov-pwa.install-alert.dismissed'))
if (app.forum.attribute('installAlerts') === '1' && !localStorage.getItem('askvortov-pwa.install-alert.dismissed'))
window.addEventListener('beforeinstallprompt', function (e) {
e.preventDefault();
const alertId = app.alerts.show(
Expand All @@ -51,7 +51,7 @@ export default () => {
});

if (
app.forum.attribute('installAlerts') &&
app.forum.attribute('installAlerts') === '1' &&
!localStorage.getItem('askvortov-pwa.install-alert.dismissed') &&
navigator.standalone === false &&
!usingAppleWebview()
Expand Down

0 comments on commit c39aba3

Please sign in to comment.