Skip to content
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

Async onInit doesn't catch promise rejection #691

Closed
jcubic opened this issue Sep 12, 2021 · 0 comments
Closed

Async onInit doesn't catch promise rejection #691

jcubic opened this issue Sep 12, 2021 · 0 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Sep 12, 2021

Issue summary

When you made an error in async onInit the error is not displayed on the terminal

Expected behavior

There should be an error on the terminal, so you can easily find it

Actual behavior

Errors are only in the Dev Tools console

Steps to reproduce

var term = $('body').terminal({}, {
  onInit: async function() {
       term.echo('Hello');
  }
});

This is a common error onInit is called before terminal returns, so you can't use term variable.

@jcubic jcubic added the Bug label Sep 12, 2021
jcubic added a commit that referenced this issue Oct 1, 2021
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Oct 1, 2021
@jcubic jcubic closed this as completed Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant