fix(setting): handle empty setting files properly

empty reader setting evalues to nil
This commit is contained in:
Qingping Hou
2014-06-04 14:55:39 -04:00
parent 945cb16dbf
commit 8162192a9d

View File

@@ -50,7 +50,7 @@ function DocSettings:open(docfile)
-- takes care of reader legacy setting
ok, stored = pcall(dofile, docfile..".kpdfview.lua")
end
if ok then
if ok and stored then
new.data = stored
end
return setmetatable(new, { __index = DocSettings})