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

composeRoot not found error in case of cancelled compose with at least one recipient #756

Open
kinkoazc opened this issue May 4, 2023 · 5 comments

Comments

@kinkoazc
Copy link
Contributor

kinkoazc commented May 4, 2023

When closing a compose modal, after having added at least one recipient, an error of Can't find composeRoot for [object Object] is logged in the recipient_change event handler:

if (composeRoot.length === 0) {

@josteink
Copy link
Collaborator

I'm not sure I fully understand the scope of this bug.

From a API usage point of view, are there use-cases which does not work as expected?

@kinkoazc
Copy link
Contributor Author

I think that, in the described use case, it is expected that no composeRoot will be found, so I don't see the point of throwing an error, making you wonder if something is indeed not ok in/with your code.

@josteink
Copy link
Collaborator

In that case, I guess "error" is more severe than it needs to be. But it could be because of something unexpected happening too.

How about warning instead of error?

@kinkoazc
Copy link
Contributor Author

Yes, that is a good idea. But only for the cases other than compose close(not sure how this case can be identified among the others, but this would be the ideal behavior).

@josteink
Copy link
Collaborator

Feel free to give it a try. PRs welcome 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants