Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix: remove the event.isUpdate check in controlling handler#931

Open
piotr-cz wants to merge 1 commit into
vite-pwa:mainfrom
piotr-cz:bugfix/controlling-is-update
Open

Fix: remove the event.isUpdate check in controlling handler#931
piotr-cz wants to merge 1 commit into
vite-pwa:mainfrom
piotr-cz:bugfix/controlling-is-update

Conversation

@piotr-cz
Copy link
Copy Markdown
Contributor

@piotr-cz piotr-cz commented May 8, 2026

Description

The check for event.isUpdate is preventing the onNeedReload() callback from being executed on first update.

This event property indicates that it's an update to service worker that was available when workbox-window was registered.

In case of first update there wasn't a service worker at the time when Workbox has started, so it's value is false.

Full explanation and reproduction is in linked issue

Linked Issues

fixes #789

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for vite-plugin-pwa-legacy ready!

Name Link
🔨 Latest commit 4277f87
🔍 Latest deploy log https://app.netlify.com/projects/vite-plugin-pwa-legacy/deploys/69fdbc9b0c43f5000787379e
😎 Deploy Preview https://deploy-preview-931--vite-plugin-pwa-legacy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@piotr-cz piotr-cz changed the title Remove the event.isUpdate check in controlling handler Fix: remove the event.isUpdate check in controlling handler May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Prompt for update doesn't reload page on first update

1 participant