Skip to content

Commit

Permalink
Fix: #14006 - 16.7.0: Context Menu with appendTo="body" throws Type E…
Browse files Browse the repository at this point in the history
…rror in a nested Table
  • Loading branch information
hugograf authored Nov 13, 2023
1 parent 2c9050a commit 4f03bbf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/components/contextmenu/contextmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1150,13 +1150,13 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {

removeAppendedElements() {
if (this.appendTo) {
if (this.appendTo === 'body') {
if(this.containerViewChild) {
if (this.appendTo === 'body') {
if(this.containerViewChild) {
this.renderer.removeChild(this.document.body, this.containerViewChild.nativeElement);
}
} else {
DomHandler.removeChild(this.containerViewChild.nativeElement, this.appendTo);
}
}
} else {
DomHandler.removeChild(this.containerViewChild.nativeElement, this.appendTo);
}
}
}

Expand Down

0 comments on commit 4f03bbf

Please sign in to comment.