Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pwa 2967 [bug]: useLink operations empty object destructuring #4084

Merged
merged 4 commits into from
May 24, 2023

Conversation

RaghavendraTirumalasetti
Copy link
Contributor

@RaghavendraTirumalasetti RaghavendraTirumalasetti commented Apr 12, 2023

Description

I've encountered during project's upgrade from PWA 10.0.0 -> 12.5.0 this chunk of the code, which breaks project's execution, and I believe there is some logic written wrong in @magento/peregrine/lib/talons/Link/useLink.js:
const operations = shouldPrefetch ? mergeOperations(DEFAULT_OPERATIONS, passedOperations) : {}

after assigning empty object to operations, couple of lines below it gets destructured to resolveUrlQuery, which is then passed to useLazyQuery, which eventually throws runtime exception, as the resolveUrlQuery is undefined.

I've fixed this via targetables and changed empty object to DEFAULT_OPERATIONS, and everything works like a charm.

Could you please address this issue?

Related Issue

Closes #https://jira.corp.adobe.com/browse/PWA-2967

Acceptance

Verification Stakeholders

Specification

Verification Steps

Test scenario(s) for direct fix/feature

Test scenario(s) for any existing impacted features/areas

Test scenario(s) for any Magento Backend Supported Configurations

Is Browser/Device testing needed?

Any ad-hoc/edge case scenarios that need to be considered?

Screenshots / Screen Captures (if appropriate)

Breaking Changes (if any)

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have added translations for new strings, if necessary.
  • I have updated the documentation accordingly, if necessary.

@pwa-studio-bot
Copy link
Collaborator

pwa-studio-bot commented Apr 12, 2023

Messages
📖

Associated JIRA tickets: PWA-2967.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next pr-test build run (assuming they are fixed).
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Generated by 🚫 dangerJS against c8b2b3d

@glo42707 glo42707 added the Triage: Dev.Experience Issue Related to Developer Experience label May 18, 2023
@glo82145 glo82145 added the version: Patch This changeset includes backwards compatible bug fixes. label May 24, 2023
@glo82145
Copy link
Collaborator

run lighthouse-desktop

@pwa-test-bot
Copy link

pwa-test-bot bot commented May 24, 2023

Successfully started codebuild job for lighthouse-desktop

@glo82145
Copy link
Collaborator

run lighthouse-mobile

@pwa-test-bot
Copy link

pwa-test-bot bot commented May 24, 2023

Successfully started codebuild job for lighthouse-mobile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:peregrine Progress: done Triage: Dev.Experience Issue Related to Developer Experience version: Patch This changeset includes backwards compatible bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants