fix(codegen): document.documentElement is null on early navigation (#33627)
This commit is contained in:
Родитель
e61cea597a
Коммит
c81504c5d6
|
@ -90,7 +90,8 @@ export class Highlight {
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
if (!this._injectedScript.document.documentElement.contains(this._glassPaneElement))
|
// 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))
|
||||||
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче