When we call CometChat.init(APP_ID, settings); it is defining document in the global scope.
What was the expected behavior?
document should not be globally defined. Other libraries use the existence of document typeof document !== 'undefined' to decide if the library should try to do browser things like accessing the DOM.
Closing issue as @cranberyxl was able to modify the conflicting library to fix this issue. In the next version of CometChat Pro (v3), we will be removing the document definition creation.
Describe the problem
When we call
CometChat.init(APP_ID, settings);
it is definingdocument
in the global scope.What was the expected behavior?
document
should not be globally defined. Other libraries use the existence of documenttypeof document !== 'undefined'
to decide if the library should try to do browser things like accessing the DOM.Reproduction
Environment