Open af-tomwilkins opened 2 years ago
Would be great to get this PR reviewed. Many thanks.
I pulled down your code to add tests to it, but was unable to reproduce the problem in tests. Could you please provide a demonstration of the repo? Before merging this PR, we need to understand the root cause and have tests for it.
@joeldenning Thanks for looking at this. The component using the parcels is in a private repository on Bitbucket and uses an in-house parcel implementation we created to tide us over, but I've published a version using single-spa-vue
to GitHub and invited you to collaborate.
Instructions to see the problem are on the README of the repository.
I don't know which repository you invited me to view. Adding a test to the single-spa-vue repository would be the best approach for demonstrating that there was a problem and that there no longer is.
I have been running into the following error using the Parcel component:
This occurs when the parent application unmounts. Looking at the lib, there's no check on the parcel status before calling
unmount
.My change is the equivalent of this line in single-spa-react: https://github.com/single-spa/single-spa-react/blob/main/src/parcel.js#L66
Ensuring that
unmount
is only ever called on parcels with a status ofMOUNTED
.I would be grateful if someone more familiar with the project could please review this, hoping it's suitable to merge!