factory() should not crash if data is null

This commit is contained in:
Bryan Ashby 2019-01-26 12:04:59 -07:00
parent 289e49f0b9
commit 3450500d27
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ class Achievement {
} }
static factory(data) { static factory(data) {
if(!data) {
return;
}
let achievement; let achievement;
switch(data.type) { switch(data.type) {
case Achievement.Types.UserStatSet : case Achievement.Types.UserStatSet :