You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useAppMetafields returns the values "true" and "false" for boolean metafields instead of true and false. This is surprising because AppMetafield.value's type definition includes boolean.
Please list the package(s) involved in the issue, and include the version you are using
@shopify/[email protected]
Describe the bug
useAppMetafields
returns the values"true"
and"false"
for boolean metafields instead oftrue
andfalse
. This is surprising becauseAppMetafield.value
's type definition includes boolean.ui-extensions/packages/ui-extensions/src/surfaces/checkout/api/standard/standard.ts
Lines 178 to 196 in c22cbda
Steps to reproduce the behavior:
boolean
.true
orfalse
to a variant's metafield.console.log(useAppMetafields({ id: yourMetafieldId }))
produces a value similar to the screenshot below.Expected behavior
AppMetafield.value
should be a boolean if the type of the metafield isboolean
, not"true"
or"false"
.Screenshots
Additional context
Similar to #971
The text was updated successfully, but these errors were encountered: