checkout-sdk-js icon indicating copy to clipboard operation
checkout-sdk-js copied to clipboard

LineItemOption.valueId can be string or null

Open daisy1754 opened this issue 6 years ago • 3 comments

Type definition says it's number: https://github.com/bigcommerce/checkout-sdk-js/blob/f79e8a43f6f32e359aeecd77c40de4d564806aed/dist/checkout-sdk.d.ts#L2743

However in the real world we get string and null as well

daisy1754 avatar Nov 22 '18 21:11 daisy1754

looks like when value is something like "123" value_id is "123" as well

daisy1754 avatar Nov 22 '18 22:11 daisy1754

Thanks for submitting this issue. Will investigate whether the API needs to be fixed or either update the JS definitions.

lpschz avatar Nov 22 '18 23:11 lpschz

This definition needs to be updated in our SDK types. API can actually return null in some scenarios.

lpschz avatar Sep 23 '19 05:09 lpschz