X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/438b8fed35ea5d250b826e9d6bd9d21f51ffb9d2..9058dabf1a7dc2623747a8e0eb5452e89c02c5ba:/lib-lua/flex-base.lua diff --git a/lib-lua/flex-base.lua b/lib-lua/flex-base.lua index 9f9fda86..1173c53f 100644 --- a/lib-lua/flex-base.lua +++ b/lib-lua/flex-base.lua @@ -4,6 +4,10 @@ local flex = require('themes/nominatim/init') function flex.load_topic(name, cfg) local topic_file = debug.getinfo(1, "S").source:sub(2):match("(.*/)") .. 'themes/nominatim/topics/'.. name .. '.lua' + if topic_file == nil then + error('Cannot find topic: ' .. name) + end + loadfile(topic_file)(nil, flex, cfg or {}) end