qwik icon indicating copy to clipboard operation
qwik copied to clipboard

fix: validate prefetch-sw messages

Open DustinJSilk opened this issue 1 year ago • 3 comments

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 change and documented my changes
  • [ ] Added new tests to cover the fix / functionality

DustinJSilk avatar Oct 07 '24 09:10 DustinJSilk

🦋 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

changeset-bot[bot] avatar Oct 07 '24 09:10 changeset-bot[bot]

Open in Stackblitz

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

pkg-pr-new[bot] avatar Oct 07 '24 09:10 pkg-pr-new[bot]

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 53557dce19c74bb7b61d4d32aaf3885a59a4e9a9

github-actions[bot] avatar Oct 07 '24 09:10 github-actions[bot]

Thanks for your help @DustinJSilk :pray: Closing since qwik uses by default since 1.14.

gioboa avatar Aug 29 '25 10:08 gioboa