Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make sure that document.createElement exists before using (#3706)
If you try and require videojs in an environment that doesn't implement `document.createElement` properly -- like in Node.js -- you could potentially get an error. This checks that `window.document && window.document.createElement` is available before calling `createElement`. We specifically check `window.document` so that `global` module won't cause issues with it's shimming of `document.createElement` in `global/document. Fixes #3665
- Loading branch information