summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 1dd2298..f2a8356 100644
--- a/init.lua
+++ b/init.lua
@@ -135,6 +135,9 @@ end
-- Returns how many entries have been viewed by the player
function doc.get_viewed_count(playername, category_id)
+ if doc.data.players[playername] == nil then
+ return nil
+ end
local count = doc.data.players[playername].stored_data.viewed_count[category_id]
if count == nil then
return 0