File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ export const useMapImages = () => {
133
133
if ( imageData . altMaps ) {
134
134
for ( const altKey of imageData . altMaps ) {
135
135
const altApiMap = maps . find ( map => map . normalizedName === altKey ) ;
136
+ if ( ! altApiMap ) {
137
+ // alt map is missing; so we skip it
138
+ continue ;
139
+ }
136
140
apiImageDataMerge ( mapGroup , {
137
141
...imageData ,
138
142
key : altKey ,
Original file line number Diff line number Diff line change @@ -1065,6 +1065,9 @@ function Map() {
1065
1065
}
1066
1066
if ( obj . possibleLocations ) {
1067
1067
for ( const loc of obj . possibleLocations ) {
1068
+ if ( ! loc . map ?. id ) {
1069
+ continue ;
1070
+ }
1068
1071
if ( loc . map . id !== mapData . id ) {
1069
1072
continue ;
1070
1073
}
@@ -1103,7 +1106,7 @@ function Map() {
1103
1106
}
1104
1107
if ( obj . zones ) {
1105
1108
for ( const zone of obj . zones ) {
1106
- if ( zone . map . id !== mapData . id ) {
1109
+ if ( ! zone . map ?. id || zone . map . id !== mapData . id ) {
1107
1110
continue ;
1108
1111
}
1109
1112
if ( ! positionIsInBounds ( zone . position ) ) {
You can’t perform that action at this time.
0 commit comments