-
Notifications
You must be signed in to change notification settings - Fork 318
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
UI crashes after deleting a selected map #625
Comments
I looked into this some. First, I'm setting the label as low-priority since this seems to only happen if you delete a map while using it. This means an admin must do this so unlikely. Second, I traced the code in src/client/app/containers/MapChartContainer.ts and it makes the map undefined and the image be a new image. This is what I would expect. However, at a later point it gets an exception when it tries to read property image of an undefined object. I'm not sure why this is happening nor where it happened. I'm going to leave this for now. |
Sorry I accidentally closed it. |
v1.1 plans to remove the map container for React hooks. This will be looked into again after that change. |
Since PR #1113 this is still happening but it catches the error and puts a message on the screen. Hopefully this will be fixed once maps go to RTK (issue #1145). Without looking at this in detail, I would think that clearing the selected map in Redux state if the deleted map is the selected map might fix this. |
This is on hold to see if going to the Redux Toolkit will easily solve the issue. |
Describe the bug
When the admin deletes a map that was previously selected, the UI will crash if the admin changes the page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The UI should not crash. If a selected map is deleted, it should simply not be displayed.
Machine info (please complete the following information)
The text was updated successfully, but these errors were encountered: