Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

The ProductPrice Block is showing an error in the Storybook #8048

Closed
tarhi-saad opened this issue Dec 29, 2022 · 2 comments · May be fixed by #8049
Closed

The ProductPrice Block is showing an error in the Storybook #8048

tarhi-saad opened this issue Dec 29, 2022 · 2 comments · May be fixed by #8049
Assignees
Labels
status: stale Stale issues and PRs have had no updates for 60 days. type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). type: storybook Issues related to storybook.

Comments

@tarhi-saad
Copy link
Contributor

Describe the bug

If we select the ProductPrice to display our block in the Storybook, an error is displayed instead:

image

To reproduce

Steps to reproduce the behavior:

  1. Go to the Storybook. You should see an error displayed instead of the ProductPrice component
  2. Select the Sale and Range variations. You should see the same error displayed
Cannot read properties of undefined (reading 'minorUnit')
TypeError: Cannot read properties of undefined (reading 'minorUnit')
    at FormattedMonetaryAmount (https://woocommerce.github.io/woocommerce-blocks/main.513e3732.iframe.bundle.js:1:116428)
    at Ch (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2206074)
    at ck (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2257911)
    at bk (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2245256)
    at ak (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2245187)
    at Tj (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2245056)
    at Lj (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2242081)
    at Jg (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2239461)
    at lk (https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2255412)
    at https://woocommerce.github.io/woocommerce-blocks/vendors~main.d14fb5db.iframe.bundle.js:10:2256801

Expected behavior

We should see the component instead of an error

Screenshots

image

Environment

WordPress (please complete the following information):

  • WordPress version: [e.g. 5.9]
  • Gutenberg version (if installed): [e.g. 12.0.0]
  • WooCommerce version: [e.g. 6.1]
  • WooCommerce Blocks version: [e.g. 7.0.0]
  • Site language:
  • Any other plugins installed:

Desktop (please complete the following information):

  • OS: [e.g. macOS, Windows]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

N/A

@tarhi-saad tarhi-saad added type: bug The issue/PR concerns a confirmed bug. type: storybook Issues related to storybook. labels Dec 29, 2022
@sunyatasattva sunyatasattva added the type: cooldown Things that are queued for a cooldown period (assists with planning). label Dec 29, 2022
@sunyatasattva sunyatasattva self-assigned this Dec 29, 2022
@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Feb 28, 2023
@mikejolley
Copy link
Member

I believe this is fixed after the SB7 update!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: stale Stale issues and PRs have had no updates for 60 days. type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). type: storybook Issues related to storybook.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants