File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1861,8 +1861,10 @@ function Map() {
18611861 let markerTitle = t ( 'Loose Loot' ) ;
18621862 let className = '' ;
18631863 const markerCategories = lootItems . reduce ( ( markerCategories , item ) => {
1864- const category = handbook . handbookCategories . find ( c => c . id === item . handbookCategories [ 0 ] . id ) ;
1865- markerCategories . add ( category ) ;
1864+ const category = handbook . handbookCategories . find ( c => c . id === item . handbookCategories [ 0 ] ?. id ) ;
1865+ if ( category ) {
1866+ markerCategories . add ( category ) ;
1867+ }
18661868 return markerCategories ;
18671869 } , new Set ( ) ) ;
18681870 if ( lootItems . length === 1 ) {
@@ -1914,7 +1916,10 @@ function Map() {
19141916 lootLink . append ( `${ lootItem . name } ` ) ;
19151917 }
19161918 popupContent . append ( lootLink ) ;
1917- const category = handbook . handbookCategories . find ( c => c . id === lootItem . handbookCategories [ 0 ] . id ) ;
1919+ const category = handbook . handbookCategories . find ( c => c . id === lootItem . handbookCategories [ 0 ] ?. id ) ;
1920+ if ( ! category ) {
1921+ continue ;
1922+ }
19181923 markerCategories . add ( category . id ) ;
19191924 if ( ! looseLootLayers [ category . normalizedName ] ) {
19201925 looseLootLayers [ category . normalizedName ] = {
You can’t perform that action at this time.
0 commit comments