Update packages/playwright-core/src/server/injected/highlight.ts
Co-authored-by: Dmitry Gozman <dgozman@gmail.com> Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
6e229b54d3
commit
64536de5e9
|
|
@ -91,7 +91,7 @@ export class Highlight {
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
// NOTE: document.documentElement can be null: https://github.com/microsoft/TypeScript/issues/50078
|
// NOTE: document.documentElement can be null: https://github.com/microsoft/TypeScript/issues/50078
|
||||||
if (this._injectedScript.document.documentElement && !this._injectedScript.document.documentElement.contains(this._glassPaneElement))
|
if (!this._injectedScript.document.documentElement?.contains(this._glassPaneElement))
|
||||||
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue