-
Notifications
You must be signed in to change notification settings - Fork 683
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to non-deprecated flag
|
glo82145
approved these changes
Apr 12, 2023
m2-community-project
bot
added
Progress: approved
and removed
Progress: ready for review
labels
Apr 12, 2023
glo82145
added
the
version: Patch
This changeset includes backwards compatible bug fixes.
label
May 24, 2023
run lighthouse-desktop |
Successfully started codebuild job for |
run lighthouse-mobile |
Successfully started codebuild job for |
4 tasks
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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