Skip to content

Commit

Permalink
don't bork on abstract buildings without a contents field
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed May 12, 2024
1 parent 0d7bfa3 commit 9866473
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/sitemap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ local function get_location_choices(site)
local choices = {}
if not site then return choices end
for _,loc in ipairs(site.buildings) do
local zones = loc.contents.building_ids
local zones = loc._type._fields.contents and loc.contents.building_ids or {}
if #zones == 0 then goto continue end
table.insert(choices, {
text=get_location_label(loc, zones),
Expand Down

0 comments on commit 9866473

Please sign in to comment.