Module:Coordinates: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(fix nil error) |
(merge prior edit) |
||
Line 495: | Line 495: | ||
if mw.wikibase and current_page.namespace == 0 then |
if mw.wikibase and current_page.namespace == 0 then |
||
local entity = mw.wikibase.getEntityObject() |
local entity = mw.wikibase.getEntityObject() |
||
if entity and entity.claims and entity.claims.P625 and entity.claims.P625[ |
if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1] then |
||
local snaktype = entity.claims.P625[ |
local snaktype = entity.claims.P625[1].mainsnak.snaktype |
||
if snaktype == 'value' then |
if snaktype == 'value' then |
||
-- coordinates exist both here and on Wikidata, and can be compared. |
-- coordinates exist both here and on Wikidata, and can be compared. |