Module:Uses TemplateStyles/sandbox: Difference between revisions

Content deleted Content added
get the namespace from tsTitle.nsText
better make sure tsSandboxTitle is not nil before calling .exists
Line 36:
local tsTitle = mw.title.new(ts)
if tsTitle then
local tsSandboxtsSandboxTitle = mw.title.new(string.format('%s:%s/sandbox/%s', tsTitle.nsText, tsTitle.baseText, tsTitle.subpageText))
if mw.title.new(tsSandbox)tsSandboxTitle and tsSandboxTitle.exists then
sandboxLink = string.format(' ([[:%s|sandbox]])', tsSandbox.prefixedText)
end
end