Skip to content

Commit

Permalink
fix: 画像登録が必要ない場合にエラーになる問題の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
junt1458 committed Feb 3, 2025
1 parent a7fd200 commit 5b2fff8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const DataConfirmTemplate: React.FC<InputFormTemplateCommonProps> = ({ isEditing

// 画像をアップロードしてFeatureにセット
const otherImageIds = (await Promise.all((paramParser.currentData.inputData.otherImageUrls || []).map(e => uploadImage(e.objectURL)))).filter(e => e != null);
const currentIds = (newData.inputData.gisData.properties as Record<string, string>)[t == "boar" ? "写真ID" : "画像ID"].split(",");
const currentIds = ((newData.inputData.gisData.properties as Record<string, string>)[t == "boar" ? "写真ID" : "画像ID"] || "").split(",");
const newIds = currentIds.concat(otherImageIds as string[]).filter(e => e);

(newData.inputData.gisData.properties as Record<string, string>)[t == "boar" ? "写真ID" : "画像ID"] = newIds.join(',');
Expand Down

0 comments on commit 5b2fff8

Please sign in to comment.