Conversation
🦋 Changeset detectedLatest commit: ea75841 The changes in this PR will be included in the next version bump. This PR includes changesets to release 83 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 28
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
fef2247 to
ea75841
Compare
| await lock({ | ||
| method: selectedMethod?.code ?? '', | ||
| order_number: result.data.placeOrder.order.order_number, | ||
| order_number: order?.order_number ?? '', |
There was a problem hiding this comment.
Undefined variable order causes runtime reference error
The code references order?.order_number but the variable order is never defined anywhere in this file. The old code used result.data.placeOrder.order.order_number directly, but the new code references a non-existent order variable. This will throw a ReferenceError: order is not defined at runtime during the payment process, breaking the MSP payment flow entirely.
| const { mollie_payment_token, order_number, mollie_redirect_url } = | ||
| result.data.placeOrder.order | ||
| const order = result.data?.placeOrder?.order | ||
| const { mollie_payment_token, order_number, mollie_redirect_url } = order |
There was a problem hiding this comment.
Optional chaining after type assertion causes potential destructuring error
After calling assertMollieOrderPlaced(result) which narrows the type to guarantee result.data.placeOrder.order exists, the code uses optional chaining result.data?.placeOrder?.order which unnecessarily widens the type back to potentially undefined. The subsequent destructuring const { mollie_payment_token, order_number, mollie_redirect_url } = order will throw a TypeError if order is undefined. While the assertion protects against this at runtime, the inconsistent pattern undermines TypeScript's type narrowing and could be confusing.
Note
Upgrade to Apollo Client v4
setContext/onErrorwithSetContextLink/ErrorLink, adoptCombinedGraphQLErrors, export rxjs helpers, addLocalState, adjust React hooks imports, and removeNormalizedCacheObjectgenericsuseFormGql*, cart/customer/payment flows) to new types/APIs; broad null-safe access fixes across example pagesTooling and CI
bundlesize.ymlwith simplifiedpr-analysisworkflowDocs
.nextduring upgradesWritten by Cursor Bugbot for commit ea75841. This will update automatically on new commits. Configure here.