Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check for
outerHTML
being on the object
Some tools, like AG Grid, polyfill `HTMLElement` to an empty object. This means that the `typeof HTMLElement !== 'undefined'` check passed, but the `v instanceof HTMLElement` translated to `v instanceof {}` which is invalid... This hopefully solves it. Alternatively, we could use `return v?.outerHTML ?? v`, but not sure if that's always safe to do.
- Loading branch information