Skip to content

Commit 64eb6b0

Browse files
committed
fix(modal): Polyfilled element remove for IE11
1 parent 2ab2926 commit 64eb6b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/modal/modal.service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ import { SuiModal } from "./modal";
44
import { Modal } from "./modal-controls";
55
import { ActiveModal } from "./active-modal";
66

7+
if (!("remove" in Element.prototype)) {
8+
Element.prototype.remove = function():void {
9+
// tslint:disable-next-line:no-invalid-this
10+
const node = this;
11+
if (node.parentNode) {
12+
node.parentNode.removeChild(node);
13+
}
14+
};
15+
}
16+
717
@Injectable()
818
export class SuiModalService {
919
constructor(private _applicationRef:ApplicationRef,

0 commit comments

Comments
 (0)