Use `pcall` to invoke `getRequireList` from `p._main` to avoid breaking {{Documentation}} when the module page doesn’t yet exist
starcitizen>Alistair3149 (Add support for `require("strict")`) |
starcitizen>Alistair3149 (Use `pcall` to invoke `getRequireList` from `p._main` to avoid breaking {{Documentation}} when the module page doesn’t yet exist) |
||
| Рядок 672: | Рядок 672: | ||
} ) | } ) | ||
local requireList, loadDataList, usedTemplateList = getRequireList | local requireList, loadDataList, usedTemplateList; | ||
do | |||
local ok; | |||
ok, requireList, loadDataList, usedTemplateList = pcall(getRequireList, currentPageName, true); | |||
if not ok then | |||
return userError(requireList); | |||
end | |||
end | |||
requireList = arr.map( requireList, function ( moduleName ) | requireList = arr.map( requireList, function ( moduleName ) | ||