chore: mitigate browser errors WTR
This commit is contained in:
parent
121e1562fa
commit
e571de808a
2 changed files with 13 additions and 4 deletions
|
|
@ -304,9 +304,14 @@ export const FormGroupMixin = dedupeMixin(
|
|||
_anyFormElementHasFeedbackFor(state) {
|
||||
return Object.keys(this.formElements).some(name => {
|
||||
if (Array.isArray(this.formElements[name])) {
|
||||
return this.formElements[name].some(el => !!el.hasFeedbackFor.includes(state));
|
||||
return this.formElements[name].some(el => {
|
||||
return Boolean(el.hasFeedbackFor && el.hasFeedbackFor.includes(state));
|
||||
});
|
||||
}
|
||||
return !!this.formElements[name].hasFeedbackFor.includes(state);
|
||||
return Boolean(
|
||||
this.formElements[name].hasFeedbackFor &&
|
||||
this.formElements[name].hasFeedbackFor.includes(state),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,6 +290,10 @@ export class OverlayController {
|
|||
}
|
||||
}
|
||||
|
||||
if (!this._renderTarget) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.__isContentNodeProjected && this.placementMode === 'local') {
|
||||
// We add the contentNode in its slot, so that it will be projected by contentWrapperNode
|
||||
this._renderTarget.appendChild(this.contentNode);
|
||||
|
|
@ -635,7 +639,7 @@ export class OverlayController {
|
|||
this.__hasActiveBackdrop = false;
|
||||
break;
|
||||
case 'teardown':
|
||||
if (!this.backdropNode) {
|
||||
if (!this.backdropNode || !this.backdropNode.parentNode) {
|
||||
return;
|
||||
}
|
||||
this.backdropNode.parentNode.removeChild(this.backdropNode);
|
||||
|
|
@ -685,7 +689,7 @@ export class OverlayController {
|
|||
this.__hasActiveBackdrop = false;
|
||||
break;
|
||||
case 'teardown':
|
||||
if (!backdropNode) {
|
||||
if (!backdropNode || !backdropNode.parentNode) {
|
||||
return;
|
||||
}
|
||||
if (animation && this.__backDropAnimation) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue