factory() should not crash if data is null
This commit is contained in:
parent
289e49f0b9
commit
3450500d27
|
@ -48,6 +48,9 @@ class Achievement {
|
|||
}
|
||||
|
||||
static factory(data) {
|
||||
if(!data) {
|
||||
return;
|
||||
}
|
||||
let achievement;
|
||||
switch(data.type) {
|
||||
case Achievement.Types.UserStatSet :
|
||||
|
|
Loading…
Reference in New Issue