fix: validate prefetch-sw messages
What is it?
- [x] Bug
Description
fixes: https://github.com/QwikDev/qwik/issues/6921
If an unknown message is sent to the SW which isn't an array, Qwik throws an error attempting to slice the array. If it is an array type, Qwik will log an error. This PR will check if messages are Qwik messages before queuing them and ignore unknown messages.
Checklist:
- [ ] My code follows the developer guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have ran
pnpm changeand documented my changes - [ ] Added new tests to cover the fix / functionality
🦋 Changeset detected
Latest commit: e7f00cb20ddfcacea0e5d1c3ed9976a635be3cad
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 4 packages
| Name | Type |
|---|---|
| @builder.io/qwik | Patch |
| eslint-plugin-qwik | Patch |
| @builder.io/qwik-city | Patch |
| create-qwik | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
npm i https://pkg.pr.new/@builder.io/qwik@6942
npm i https://pkg.pr.new/@builder.io/qwik-city@6942
npm i https://pkg.pr.new/eslint-plugin-qwik@6942
npm i https://pkg.pr.new/create-qwik@6942
commit: e7f00cb
built with Refined Cloudflare Pages Action
⚡ Cloudflare Pages Deployment
| Name | Status | Preview | Last Commit |
|---|---|---|---|
| qwik-docs | ✅ Ready (View Log) | Visit Preview | 53557dce19c74bb7b61d4d32aaf3885a59a4e9a9 |
Thanks for your help @DustinJSilk :pray: Closing since qwik uses by default since 1.14.