misc: avoid some more errors with malformed properties vs match() that expects strings

This commit is contained in:
jean-emmanuel 2022-02-08 08:54:37 +01:00
parent 0cf8d1e42f
commit b0e9642af7
3 changed files with 7 additions and 6 deletions

View file

@ -278,7 +278,7 @@ class Menu extends MenuBase {
scrollY = 0,
stop = this.getProp('ignoreTabs') ? /root/ : /root|tab/
while (parent && parent.props && !parent.getProp('type').match(stop)) {
while (parent && parent.props && !String(parent.getProp('type')).match(stop)) {
parent.modalBreakout += (this.opened ? 1 : -1)
if (parent.modalBreakout > 0) parent.container.classList.add('modal-breakout')

View file

@ -179,7 +179,7 @@ class Modal extends Panel {
var parent = this.parent,
stop = this.getProp('ignoreTabs') ? /root/ : /root|tab/
while (parent && parent.props && !parent.getProp('type').match(stop)) {
while (parent && parent.props && !String(parent.getProp('type')).match(stop)) {
parent.modalBreakout += (this.value ? 1 : -1)
if (parent.modalBreakout > 0) parent.container.classList.add('modal-breakout')