aiwon0035 / timetable

https://timetable-kappa-ruby.vercel.app
1 stars 0 forks source link

TypeError: [配列] is not iterableエラーの解消 #13

Closed aiwon0035 closed 6 months ago

aiwon0035 commented 7 months ago

const newUuidArray = [...storedUuidArray, uniqueId]; このコードで、storedUuidArrayがからの配列の場合に出るエラー。

const newUuidArray = [...(storedUuidArray || []), uniqueId]; こうすれば解決