1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2024-11-13 22:30:16 +01:00

Fix error due to unchecked JSON parsing

This commit is contained in:
rubenwardy 2021-01-10 17:17:57 +00:00
parent 9c74a3f85a
commit 6dc91cf893

View File

@ -80,7 +80,8 @@ function awards.load()
os.rename(old_save_path, minetest.get_worldpath().."/awards.bk.txt")
awards.save()
else
__player_data = minetest.parse_json(storage:get_string("player_data")) or {}
local json = storage:get("player_data")
__player_data = json and minetest.parse_json(json) or {}
end
end