make sure items is defined

This commit is contained in:
j 2023-05-11 11:01:45 +01:00
parent 0396aa0679
commit 09bc78ec02

View file

@ -306,7 +306,7 @@ Ox.Menu = function(options, self) {
self.optionGroup = {}; self.optionGroup = {};
self.optionGroupOffset = {}; self.optionGroupOffset = {};
items.forEach(function(item, i) { items.forEach(function(item, i) {
if (item.group) { if (item.group && item.items) {
items[i] = item.items.map(function(v) { items[i] = item.items.map(function(v) {
return Ox.extend(v, { return Ox.extend(v, {
group: item.group group: item.group