From 3450500d273c246d073b0b439a5c2e175d818acc Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 26 Jan 2019 12:04:59 -0700 Subject: [PATCH] factory() should not crash if data is null --- core/achievement.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/achievement.js b/core/achievement.js index 7b6a4b16..a5de541f 100644 --- a/core/achievement.js +++ b/core/achievement.js @@ -48,6 +48,9 @@ class Achievement { } static factory(data) { + if(!data) { + return; + } let achievement; switch(data.type) { case Achievement.Types.UserStatSet :