Browse Source

ensure that all submenus use correct svg-enabled renderer

- will correctly override menu renderer regards of the order in which the submenus get added to/inserted in one another
telamonian 5 years ago
parent
commit
1084cca7af
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/ui-components/src/icon/widgets/menusvg.ts

+ 3 - 0
packages/ui-components/src/icon/widgets/menusvg.ts

@@ -77,6 +77,9 @@ export namespace MenuSvg {
       (menu as any).renderer = MenuSvg.defaultRenderer;
     }
 
+    // ensure correct renderer on any submenus that get added in the future
+    menu.insertItem = MenuSvg.prototype.insertItem;
+
     // recurse through submenus
     for (const item of (menu as any)._items as Menu.IItem[]) {
       if (item.submenu) {