gmail.js
gmail.js copied to clipboard
composeRoot not found error in case of cancelled compose with at least one recipient
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:
https://github.com/KartikTalwar/gmail.js/blob/edd1beeacf9faa9f82af7929706e95d0cd83e463/src/gmail.js#L2529
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?
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.
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?
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).
Feel free to give it a try. PRs welcome 🙂