[gnome-shell/wip/rstrode/rhel-7.9: 47/86] popupMenu: Guard against non-menu-item children
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/rhel-7.9: 47/86] popupMenu: Guard against non-menu-item children
- Date: Fri, 12 Feb 2021 19:04:07 +0000 (UTC)
commit 1335df41241305136d4c92d89ae45ea61c1b7a5e
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jun 9 19:42:21 2020 +0200
popupMenu: Guard against non-menu-item children
This avoid a harmless but annoying warning.
js/ui/popupMenu.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 83194d72ba..39ba93d8d1 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -714,7 +714,8 @@ var PopupMenuBase = new Lang.Class({
},
_getMenuItems() {
- return this.box.get_children().map(a => a._delegate).filter(item => {
+ const children = this.box.get_children().filter(a => a._delegate !== undefined);
+ return children.map(a => a._delegate).filter(item => {
return item instanceof PopupBaseMenuItem || item instanceof PopupMenuSection;
});
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]