Модуль:Serialization/EntityTableSelector: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 343: | Строка 343: | ||
if trim(jsonText) == "" then | if trim(jsonText) == "" then | ||
return " | return "" | ||
end | end | ||
local ok, data = pcall(mw.text.jsonDecode, jsonText) | local ok, data = pcall(mw.text.jsonDecode, jsonText) | ||
if not ok or type(data) ~= "table" then | if not ok or type(data) ~= "table" then | ||
return " | return "" | ||
end | end | ||
local selector = normalizeSelector(data) | local selector = normalizeSelector(data) | ||
if not selector then | if not selector then | ||
return " | return "" | ||
end | end | ||