From 91fb41dab017d82bbc76125227c6d6520c5b7435 Mon Sep 17 00:00:00 2001 From: harukin-OneMix4 Date: Fri, 15 Dec 2023 01:11:14 +0900 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BB=8A=E3=81=8C=E9=A7=85=E9=96=93?= =?UTF-8?q?=E4=BB=A5=E5=A4=96=E3=81=AE=E5=A0=B4=E6=89=80=E3=81=AB=E5=B1=85?= =?UTF-8?q?=E3=82=8B=E6=99=82=E3=81=AB=E4=BD=8D=E7=BD=AE=E3=82=A2=E3=82=A4?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E8=A1=A8=E7=A4=BA=E3=81=A7=E3=82=AF=E3=83=A9?= =?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B=E3=83=90=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ActionSheetComponents/EachTrainInfo.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/ActionSheetComponents/EachTrainInfo.js b/components/ActionSheetComponents/EachTrainInfo.js index c0ba7b0..b007311 100644 --- a/components/ActionSheetComponents/EachTrainInfo.js +++ b/components/ActionSheetComponents/EachTrainInfo.js @@ -99,6 +99,10 @@ export const EachTrainInfo = ({ // arrayは現在位置の駅ID(駅在宅の場合は1つの配列、駅間の場合は2つの配列) // stopStationIDListは停車駅の駅IDの配列 if (!stopStationIDList.length) return []; + // arrayが二次元配列だったら早期リターン + if (!array instanceof Array) return []; + if (!array.length) return []; + if (array[0] instanceof Array) return []; const arrayNumber = array.map((d) => ({ line: d .split("")