Module:DatasetLoader: Difference between revisions
// via Wikitext Extension for VSCode Tag: Reverted |
// via Wikitext Extension for VSCode Tag: Manual revert |
||
| Line 19: | Line 19: | ||
local data | local data | ||
-- Try JsonConfig extension (mw.ext.data.get) | -- Try JsonConfig extension (mw.ext.data.get) | ||
| Line 27: | Line 26: | ||
if success and type(result) == 'table' then | if success and type(result) == 'table' then | ||
data = result | data = result | ||
else | else | ||
-- Fallback to mw.loadData from Data: namespace | -- Fallback to mw.loadData from Data: namespace | ||
| Line 35: | Line 33: | ||
if success and type(result) == 'table' then | if success and type(result) == 'table' then | ||
data = result | data = result | ||
end | end | ||
end | end | ||
| Line 42: | Line 39: | ||
if not data or type(data) ~= 'table' then | if not data or type(data) ~= 'table' then | ||
data = {} | data = {} | ||
end | end | ||