Move Modal behind ternary for the ModalView component
Only provide a value for initialFocus if there is no error with the chatbot
Add config for bundling a CommonJS compatible output
Notes
This prevents an error that stems when the Chatbot cannot connect to the server. The initialFocus of the LG modal component will break due to the error message displayed for the Chatbot not having the ID associated with initialFocus
I included bundling for CommonJS to allow for our Jest tests to pass. Unfortunately, Jest does not support ESM (not easily, at least), and this leads to test failures in Snooty.
Jira: https://jira.mongodb.org/browse/DOP-4515
Changes
Modal
behind ternary for theModalView
componentinitialFocus
if there is no error with the chatbotNotes
initialFocus
of the LG modal component will break due to the error message displayed for the Chatbot not having the ID associated withinitialFocus