Fix: Handle designJson as string in checkout API
The designJson field can be either a parsed object or a JSON string depending on how it was stored. The checkout API was assuming it was always an object and casting it, which caused 'Cannot read properties of undefined' error when trying to access .length on front/back arrays. Now properly parses the string if needed and safely accesses array properties with optional chaining.
This commit is contained in:
@@ -64,7 +64,8 @@
|
||||
"Bash(git status *)",
|
||||
"Bash(git revert *)",
|
||||
"Bash(git commit -m 'Fix price display issues and layout in design review page *)",
|
||||
"Bash(git commit -m 'Fix: Calculate effectivePrice in design API endpoints *)"
|
||||
"Bash(git commit -m 'Fix: Calculate effectivePrice in design API endpoints *)",
|
||||
"Bash(git commit -m 'Fix: Handle designJson as string in checkout API *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user