mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: add more details to product tile
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ export function normalizeUrl(domain: string, url: string) {
|
||||
|
||||
export const parseMetaFieldValue = <T>(field: { value: string } | null): T | null => {
|
||||
try {
|
||||
return JSON.parse(field?.value || '{}');
|
||||
return field?.value ? JSON.parse(field.value) : null;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user