feat(menu): add console error for incorrect usage of contentId (#23871)

resolves #23810
This commit is contained in:
William Martin
2021-09-08 08:54:01 -04:00
committed by GitHub
parent 5fd80fd438
commit 879ab8ebda

View File

@ -179,6 +179,11 @@ AFTER:
console.error('Menu: must have a "content" element to listen for drag events on.');
return;
}
if (this.el.contains(content)) {
console.error(`Menu: "contentId" should refer to the main view's ion-content, not the ion-content inside of the ion-menu.`);
}
this.contentEl = content as HTMLElement;
// add menu's content classes