now sPhone.getTheme returns default if the config is deleted

This commit is contained in:
Ale32bit 2016-10-30 21:14:02 +01:00 committed by GitHub
parent 689c44ae10
commit 279758a48c

View file

@ -136,7 +136,10 @@ local function kernel()
error("bad arguement: double expected, got nil",2) error("bad arguement: double expected, got nil",2)
end end
local n = config.read(fileTheme, id) local n = config.read(fileTheme, id)
return n if n then
return n
end
return sPhone.defaultTheme[id]
end end
function sPhone.setDefaultApp(app, path) function sPhone.setDefaultApp(app, path)