@@ -208,6 +208,7 @@ export function Component() {
208208
209209 if (
210210 supporting_document_details
211+ && supporting_document_details . id
211212 && supporting_document_details . file
212213 ) {
213214 newMap [
@@ -217,6 +218,7 @@ export function Component() {
217218
218219 if (
219220 assessment_report_details
221+ && assessment_report_details . id
220222 && assessment_report_details . file
221223 ) {
222224 newMap [
@@ -226,28 +228,31 @@ export function Component() {
226228
227229 if (
228230 event_map_file
231+ && event_map_file . id
229232 && event_map_file . file
230233 ) {
231234 newMap [ event_map_file . id ] = event_map_file . file ;
232235 }
233236
234237 if (
235238 cover_image_file
239+ && cover_image_file . id
236240 && cover_image_file . file
237241 ) {
238242 newMap [ cover_image_file . id ] = cover_image_file . file ;
239243 }
240244
241245 if ( ( images_file ?. length ?? 0 ) > 0 ) {
242246 images_file ?. forEach ( ( img ) => {
243- if ( isDefined ( img . file ) ) {
247+ if ( isDefined ( img . file ) && isDefined ( img . id ) ) {
244248 newMap [ img . id ] = img . file ;
245249 }
246250 } ) ;
247251 }
248252
249253 if (
250254 disaster_category_analysis_details
255+ && disaster_category_analysis_details . id
251256 && disaster_category_analysis_details . file
252257 ) {
253258 newMap [
@@ -257,6 +262,7 @@ export function Component() {
257262
258263 if (
259264 targeting_strategy_support_file_details
265+ && targeting_strategy_support_file_details . id
260266 && targeting_strategy_support_file_details . file
261267 ) {
262268 newMap [
@@ -265,6 +271,7 @@ export function Component() {
265271 }
266272 if (
267273 scenario_analysis_supporting_document_details
274+ && scenario_analysis_supporting_document_details . id
268275 && scenario_analysis_supporting_document_details . file
269276 ) {
270277 newMap [
@@ -274,14 +281,19 @@ export function Component() {
274281
275282 if (
276283 contingency_plans_supporting_document_details
284+ && contingency_plans_supporting_document_details . id
277285 && contingency_plans_supporting_document_details . file
278286 ) {
279287 newMap [
280288 contingency_plans_supporting_document_details . id
281289 ] = contingency_plans_supporting_document_details . file ;
282290 }
283291
284- if ( budget_file_details && budget_file_details . file ) {
292+ if (
293+ budget_file_details
294+ && budget_file_details . id
295+ && budget_file_details . file
296+ ) {
285297 newMap [ budget_file_details . id ] = budget_file_details . file ;
286298 }
287299
0 commit comments