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

Fix inventory list timing console errors #4478

Merged
merged 13 commits into from
Jan 18, 2024
Merged

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Jan 10, 2024

Any background context you want to provide?

There were two console errors that were raised when a user navigated away from the inventory list before if finished loading.

  1. inventory_list_controller.js:381 Uncaught TypeError: Cannot read properties of null (reading 'getElementsByTagName')
  2. inventory_list_controller.js:1636 Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid

What's this PR do?

  1. Assigns document.getElementById(elementId) to a new variable (element) on page load prior to executing the interval, allowing the delayed code to access the values and functions of element
  2. Checks for the presence of the gridMenuScope before attempting to add to it.

How should this be manually tested?

Navigate to the inventory list, and just as the spinner appears navigate away. Monitor the console

What are the relevant tickets?

#4478
#4333

Screenshots (if appropriate)

Screenshot 2024-01-10 at 4 46 18 PM

@perryr16 perryr16 added the Bug label Jan 10, 2024
@perryr16 perryr16 changed the title 4326 inv list console errors Fix inventory list timing console errors Jan 11, 2024
@perryr16 perryr16 marked this pull request as ready for review January 11, 2024 16:16
@kflemin kflemin self-requested a review January 18, 2024 20:50
@kflemin kflemin merged commit acc3198 into develop Jan 18, 2024
8 checks passed
@kflemin kflemin deleted the 4326-inv-list-console-errors branch January 18, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants