Fix issue with using launching the add track widget on views that are not displaying any regions #1679
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative Proposal to pull request 1676 to fix bug 1674
Jbrowse web currently crashes when we click File -> Open Track while an import form is being rendered due to
This PR
Adds error handling when retrieving assemblyName from displayedRegions in the addTrackWidget model.ts. Not all views have displayedRegions @ session.views[0] (e.g synteny which has them @ session.views[0].views) which causes 'TypeError: Cannot read property 'assemblyName' of undefined'. DisplayedRegions can also be undefined when opening a view (import form) but displayedRegions are still yet to be defined which will throw the same error.
Small test in CircularView. Tests being able to click
Open Track
from circular view set up wizard without crashing Jbrowse web.