Anonymous user
Module:Format link: Difference between revisions
An extra layer of nil check
(Added extra condition to check if title object is null) |
(An extra layer of nil check) |
||
Line 149:
--Test if page exists if a diagnostic category is specified
if catMissing and (mw.ustring.len(catMissing) > 0) then
local title =
if parsed.page then title = mw.title.new(parsed.page) end
if title and (not title.isExternal) and (not title.exists) then
category = mw.ustring.format('[[Category:%s]]', catMissing)
|