Line 14:
Line 14:
end
end
if map == '' then
if map == '' then
−
local entity = mw.wikibase.getEntity() or {}
+
local currentEntityId = mw.ext.UnlinkedWikibase.getEntityId('enwiki')
+
if currentEntityId then
+
local entity = mw.wikibase.getEntity(currentEntityId) or {}
+
else
+
local entity = {}
+
end
local claims = entity.claims or {}
local claims = entity.claims or {}
local mapProp = claims.p15
local mapProp = claims.p15