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

fix(core): fix configurable operation id decoding when using uuids #2483

Conversation

jacobfrantz1
Copy link
Contributor

Fixes issue #2019

Id's were getting JSON stringified when they shouldn't have been. It only worked for integer ids because JSON.stringify(1) == 1. For uuids, JSON.stringify("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX") != "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX".

Later, when it uses the values in business logic:

case 'ID':
return value as any;
, JSON.parse() is not called on ids.

I can't guarantee this doesn't break anything as the change is in a critical area.

@netlify
Copy link

netlify bot commented Oct 23, 2023

Deploy Preview for effervescent-donut-4977b2 canceled.

Name Link
🔨 Latest commit 6155d4f
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/6536d96925d32b0007c93f51

@michaelbromley michaelbromley merged commit 47f606c into vendure-ecommerce:master Oct 27, 2023
14 checks passed
@michaelbromley
Copy link
Member

I tested this out locally and it solves the issue. The fact that none of the e2e tests are breaking is a good sign that it should be safe.

Thank you for taking the time to investigate and fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants