diff --git a/lib/components/Redoc/redoc.ts b/lib/components/Redoc/redoc.ts index 266772187b..18aa49509d 100644 --- a/lib/components/Redoc/redoc.ts +++ b/lib/components/Redoc/redoc.ts @@ -76,7 +76,7 @@ export class Redoc extends BaseComponent implements OnInit { optionsMgr.options = getPreOptions(); this.element = elementRef.nativeElement; - this.$parent = this.element.parentElement; + this.$parent = this.element.parentNode as Element; this.$refElem = this.element.nextElementSibling; //parse options (top level component doesn't support inputs) diff --git a/lib/utils/md-renderer.ts b/lib/utils/md-renderer.ts index 1fe16d1a50..22215eec86 100644 --- a/lib/utils/md-renderer.ts +++ b/lib/utils/md-renderer.ts @@ -6,9 +6,9 @@ import * as Remarkable from 'remarkable'; import { StringMap } from './'; function HTMLescape(html: string): string { - return document.createElement('div') + return (document.createElement('div') .appendChild(document.createTextNode(html)) - .parentElement + .parentNode as Element) .innerHTML; }