Module:Sandbox/BrandonXLF/3: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 32:
end
if mw.title.new('MediaFile:' .. fileName).file.exists then -- Check if the file exists and record it if it does
existingFile = fileName
end
end
if existingFile ~== '' then
fileName = 'RR ' .. route .. ' jct.svg' -- Try fallback file
if mw.title.new('MediaFile:' .. fileName).file.exists then -- Check if the fallback file exists and record if it does
existingFile = fileName
end
end
 
if existingFile == '' then
return '' -- Return nothing if no existing file was found