Skip to content

Commit 70667ad

Browse files
committed
fix: Fixed modal "close" on IE
InfomediaLtd#377
1 parent 62fdf5d commit 70667ad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ declare var Materialize:any;
1616
export function toast(...args) {
1717
Materialize.toast(...args);
1818
}
19+
20+
// polyfill remove any elem in DOM - https://github.com/InfomediaLtd/angular2-materialize/issues/377 (IE)
21+
if (!Element.prototype.remove) {
22+
Element.prototype.remove = function remove() {
23+
if (this.parentNode) {
24+
this.parentNode.removeChild(this);
25+
}
26+
};
27+
}

0 commit comments

Comments
 (0)