Repository navigation
Fixed crash on categories collapse, document sidebar close, resize from desktop to mobile - #5640
Conversation
|
Expected to have been caused by #5450 (cc @mkaz). Which means, based on the intention of allowing this to more easily allow Really, it speaks to a bigger problem of this approach to making network requests within a component. One which I'd hope will become resolved with changes in direction like #5219 |
aduth
left a comment
There was a problem hiding this comment.
👍
Seems we could also consider unsetting this.fetchRequest when the request is completed, so we're not needlessly causing abort (not that I expect it has much overhead).
…re not assigning the promise to this.fetchRequest as componentWillUnmount expected.
b12f615 to
e0fff87
Compare
|
Thank you for the review @aduth, I applied your suggestion of unsetting the variable when the requests are finished. |
|
@aduth - yeh, I had to add in checks for |
In HierarchicalTermSelector we were not assigning the promise to this.fetchRequest as componentWillUnmount expected.
So each time componentWillUnmount was called the app crashed.
Fixes: #5637
How Has This Been Tested?
Verify it is possible to open and collapse categories panel without any problem.
Verify we can close sidebar with/without categories collapsed, and verify closing sidebar when resizing to mobile also works as expected.
Try to add a category as it generates a different request and see it is still possible to collapse the panel.