From 70667ad212e29c81d58e90d6aefeee00789f66fe Mon Sep 17 00:00:00 2001 From: Ruby Boyarski Date: Thu, 5 Oct 2017 09:42:06 +0300 Subject: [PATCH] fix: Fixed modal "close" on IE #377 --- src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index ce9f9bd..1230d66 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,3 +16,12 @@ declare var Materialize:any; export function toast(...args) { Materialize.toast(...args); } + +// polyfill remove any elem in DOM - https://github.com/InfomediaLtd/angular2-materialize/issues/377 (IE) +if (!Element.prototype.remove) { + Element.prototype.remove = function remove() { + if (this.parentNode) { + this.parentNode.removeChild(this); + } + }; +} \ No newline at end of file