Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Check if done resolving first in authors example of dataviews #65246

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

Shelob9
Copy link
Contributor

@Shelob9 Shelob9 commented Sep 11, 2024

What?

  • I got error, pasted below when trying this example.
normalize-fields.js:14 Uncaught TypeError: Cannot read properties of undefined (reading 'map')
    at normalizeFields (normalize-fields.js:14:1)
    at index.js:54:48
    at mountMemo (react-dom.js?ver=18.3.1:16416:21)
    at Object.useMemo (react-dom.js?ver=18.3.1:16861:18)
    at useMemo (react.js?ver=18.3.1:1640:23)
    at DataViews (index.js:54:26)
    at renderWithHooks (react-dom.js?ver=18.3.1:15496:20)
    at mountIndeterminateComponent (react-dom.js?ver=18.3.1:20113:15)
    at beginWork (react-dom.js?ver=18.3.1:21636:18)
    at HTMLUnknownElement.callCallback (react-dom.js?ver=18.3.1:4151:16)
  • index.js:54 is const _fields = useMemo(() => normalizeFields(fields), [fields]); in @wordpress/dataviews/build-module/components/dataviews/index.js

Why?

  • This fixed it by waiting until data has loaded

How?

  • Update docs

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Shelob9 <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant