Use `pcall` to invoke `getInvokeCallList` from `p._main` to avoid breaking {{Documentation}} when the template page doesn’t yet exist
starcitizen>Alistair3149 (Use `pcall` to invoke `getInvokeCallList` from `p._main` to avoid breaking {{Documentation}} when the template page doesn’t yet exist) |
starcitizen>Alistair3149 (Use `pcall` to invoke `getInvokeCallList` from `p._main` to avoid breaking {{Documentation}} when the template page doesn’t yet exist) |
||
| Рядок 628: | Рядок 628: | ||
if currentPageName:find( '^Template:' ) then | if currentPageName:find( '^Template:' ) then | ||
local ok, invokeList = pcall(getInvokeCallList, currentPageName) | local ok, invokeList = pcall( getInvokeCallList, currentPageName ) | ||
if ok then | if ok then | ||
return formatInvokeCallList( currentPageName, addCategories, invokeList ) .. formatTemplateStylesList( currentPageName, addCategories, templateStylesList ) | return formatInvokeCallList( currentPageName, addCategories, invokeList ) .. formatTemplateStylesList( currentPageName, addCategories, templateStylesList ) | ||