Content deleted Content added
remove the summary table code, and don't use libraryUtil as everything using it was either internal or reserved |
check errors in the format option |
||
Line 420:
if options.format == 'json' then
return mw.text.jsonEncode(result)
elseif options.format == nil or options.format == 'lua' then
else▼
return result
elseif type(options.format) ~= 'string' then
return makeError(
'sipa-format-type-error',
string.format(
"'format' options key was type %s (expected string or nil)",
type(options.format)
)
)
▲ else
return makeError(
'sipa-invalid-format',
string.format(
"invalid format '%s' (expected 'json' or 'lua')",
type(options.format)
)
)
end
end
|