Skip to content

Commit

Permalink
Don't show events or POIs if we can't translate positions
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Sep 9, 2024
1 parent 3e1ecc4 commit f9e7494
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function provider:RefreshAllData()
-- translate position
poiInfo.position = addon:TranslatePosition(poiInfo.position, mapInfo.mapID, mapID)

map:AcquirePin(self:GetPinTemplate(), poiInfo)
if poiInfo.position then
map:AcquirePin(self:GetPinTemplate(), poiInfo)
end
end
end
end
Expand Down
4 changes: 3 additions & 1 deletion poi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ function provider:RefreshAllData()
-- translate position
poiInfo.position = addon:TranslatePosition(poiInfo.position, mapInfo.mapID, mapID)

map:AcquirePin(self:GetPinTemplate(), poiInfo)
if poiInfo.position then
map:AcquirePin(self:GetPinTemplate(), poiInfo)
end
end
end
end
Expand Down

0 comments on commit f9e7494

Please sign in to comment.