Modul:SDC tracking: Unterschied zwischen den Versionen

K 1 Version importiert
K Emit nothing when no Wikibase/SDC backend present (fixes Lua error, avoids bogus maintenance categories)
 
Zeile 46: Zeile 46:
-- check if statement exist
-- check if statement exist
local output = ''
local output = ''
if not mw.wikibase then return '' end -- no Wikibase/SDC backend on this wiki
local entity = mw.wikibase.getEntity()
local entity = mw.wikibase.getEntity()
if entity and entity.statements and entity.statements[args.property] then
if entity and entity.statements and entity.statements[args.property] then
Zeile 75: Zeile 76:
-- check if statement exist
-- check if statement exist
if not mw.wikibase then return '' end -- no Wikibase/SDC backend on this wiki
local entity = mw.wikibase.getEntity()
local entity = mw.wikibase.getEntity()
if entity and entity.statements and entity.statements[args.property] then
if entity and entity.statements and entity.statements[args.property] then