Fix options not getting added to empty sub menus

This commit is contained in:
JannisX11 2023-04-18 18:41:44 +02:00
parent 52550af6c1
commit 3d87c1f778

View File

@ -541,7 +541,7 @@ class Menu {
} else {
for (var i = 0; i < arr.length; i++) {
var item = arr[i]
if (item.children && item.children.length > 0 && item.id === track[layer] && layer < 20) {
if (item.children instanceof Array && item.id === track[layer] && layer < 20) {
traverse(item.children, layer+1)
i = 1000
}