Dispatcher: QuickMenu: Fix footgun

Fixes: #9594
pull/9598/head
yparitcher 2 years ago
parent ad22942108
commit a916a5e8a2

@ -851,7 +851,8 @@ function Dispatcher:addSubMenu(caller, menu, location, settings)
and location[settings].settings.show_as_quickmenu
end,
callback = function()
if location[settings] and location[settings].settings then
if location[settings] then
if location[settings].settings then
if location[settings].settings.show_as_quickmenu then
location[settings].settings.show_as_quickmenu = nil
if next(location[settings].settings) == nil then
@ -864,6 +865,7 @@ function Dispatcher:addSubMenu(caller, menu, location, settings)
location[settings].settings = {["show_as_quickmenu"] = true}
end
caller.updated = true
end
end,
})
table.insert(menu, {

Loading…
Cancel
Save