Anonymous user
Module:Clickable button 2: Difference between revisions
check that linkTitle exists before trying to use it
m (Protected Module:Clickable button 2: High-risk Lua module ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))) |
(check that linkTitle exists before trying to use it) |
||
Line 48:
local currentTitle = mw.title.getCurrentTitle()
local success, linkTitle = pcall(mw.title.new, args[1])
if success
if success and mw.title.equals(currentTitle, linkTitle) then▼
and linkTitle
then
if class == 'ui-button-blue'
or class == 'mw-ui-progressive'
|