[fix] uncaught null when jet view destroyed mid-render#53
Open
kullias wants to merge 1 commit into
Open
Conversation
- _render_final resolves quietly instead of Promise.reject(null) when the view/app or its slot widget is gone: a render that finishes after the view was destroyed (e.g. a jetapp widget destroyed during its initial fire-and-forget render, as with Webix Query) is now a no-op - guard the this.ready chain and the top-level/refresh continuations so a benign NavigationBlocked neither leaks as an unhandled rejection nor permanently wedges the public ready chain, while real errors still throw - swallow the benign rejection from the fire-and-forget this.ui() render - add browser tests covering the refresh and widget.destructor() cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
the issue: at runtime, query and other jet-based widgets throw unhandled promise rejected(null) errors with no stack trace. not fatal, but unnecessarily litter the error log
the cause - promise rejection with null in render when during render the app was destroyed
this may happen during navigation and destruction of views, but it's hard to reproduce when you want it just by interacting with the UI
the minimalist reproduction of the issue: https://snippet.webix.com/kaxhdkk7
the PR is into 2.2 since this seems to be the branch that is used to publish betas for the Jet widgets