File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -404,14 +404,15 @@ class EventManager extends Logger {
404
404
this . available [ category ] . forEach ( ( item ) => {
405
405
if ( ! Number . isNaN ( parseInt ( item . charAt ( 0 ) ) ) ) {
406
406
const [ id , form ] = item . split ( '-' )
407
+ const formId = form || '0'
407
408
if ( ! this . masterfile . pokemon [ id ] ) {
408
409
this . masterfile . pokemon [ id ] = {
409
410
name : '' ,
410
411
pokedexId : + id ,
411
412
types : [ ] ,
412
413
quickMoves : [ ] ,
413
414
chargedMoves : [ ] ,
414
- defaultFormId : + form ,
415
+ defaultFormId : + formId ,
415
416
forms : { } ,
416
417
genId : 0 ,
417
418
}
@@ -420,8 +421,8 @@ class EventManager extends Logger {
420
421
if ( ! this . masterfile . pokemon [ id ] . forms ) {
421
422
this . masterfile . pokemon [ id ] . forms = { }
422
423
}
423
- if ( ! this . masterfile . pokemon [ id ] . forms [ form ] ) {
424
- this . masterfile . pokemon [ id ] . forms [ form ] = { name : '*' , category }
424
+ if ( ! this . masterfile . pokemon [ id ] . forms [ formId ] ) {
425
+ this . masterfile . pokemon [ id ] . forms [ formId ] = { name : '*' , category }
425
426
this . log . debug (
426
427
`Added ${ this . masterfile . pokemon [ id ] . name } Key: ${ item } to masterfile. (${ category } )` ,
427
428
)
You can’t perform that action at this time.
0 commit comments