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: unhandled Runtime Error in updateScrollButtonState and build warning #1543

Closed
moathabuhamad-cengage opened this issue Nov 12, 2024 · 1 comment · Fixed by #1548
Closed
Labels
react-magma-docs Improvements or additions to documentation

Comments

@moathabuhamad-cengage
Copy link
Collaborator

moathabuhamad-cengage commented Nov 12, 2024

Description:

  1. I randomly encounter a runtime error in the updateScrollButtonState function in scrolling through docs pages
  2. remove the warning about missing dependency: 'headings' when building docs

Error Details:

Error in function updateScrollButtonState in ../../packages/react-magma-dom/dist/esm/index.js:59
Cannot read properties of null (reading 'scrollTop')

../../packages/react-magma-dom/dist/esm/index.js:59
  57 |
  58 |   function updateScrollButtonState() {
> 59 |     const { scrollTop, scrollHeight, clientHeight, scrollWidth, clientWidth } =
     |            ^
  60 |       tabsWrapperRef.current;
  61 |     let showStartScroll;
  62 |     let showEndScroll;

Warning Details

warn 
---website/react-magma-docs/src/components/SubPageTabs/index.js
 136:6  warning  React Hook React.useEffect has a missing dependency: 'headings'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
@moathabuhamad-cengage moathabuhamad-cengage added the react-magma-docs Improvements or additions to documentation label Nov 12, 2024
@moathabuhamad-cengage moathabuhamad-cengage changed the title docs: unhandled Runtime Error in updateScrollButtonState docs: unhandled Runtime Error in updateScrollButtonState and build warning Nov 12, 2024
@moathabuhamad-cengage
Copy link
Collaborator Author

warning will be fixed by #1548

@moathabuhamad-cengage moathabuhamad-cengage linked a pull request Jan 27, 2025 that will close this issue
3 tasks
@github-project-automation github-project-automation bot moved this from To Do to Ready for QA in React Magma Jan 27, 2025
@silvalaura silvalaura moved this from Ready for QA to Done in React Magma Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react-magma-docs Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant