We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 555f1b4 commit ff0c2b6Copy full SHA for ff0c2b6
1 file changed
library/lua/json.lua
@@ -1,5 +1,6 @@
1
local _ENV = mkmodule('json')
2
-local internal = require 'json.internal'
+
3
+local internal = require('json.internal')
4
local fs = dfhack.filesystem
5
6
encode_defaults = {
@@ -39,7 +40,7 @@ function decode_file(path, ...)
39
40
end
41
local contents = f:read('*all')
42
f:close()
- return decode(contents, ...)
43
+ return decode(contents, ...) or {}
44
45
46
local _file = defclass()
0 commit comments