Skip to content

Commit ac06759

Browse files
committed
fix: Uncaught TypeError: Cannot read property '0' of undefined
https://rollbar.com/HackforPlay/portal/items/3628/
1 parent b64b4b1 commit ac06759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/recoils/useDropper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function useDropper() {
2929
if (!pages) return;
3030

3131
for (let layer = 0; layer < sceneMap.tables.length; layer++) {
32-
const index = sceneMap.tables[layer][y][x];
32+
const index = sceneMap.tables[layer]?.[y]?.[x];
3333
if (index > 0) {
3434
// index から page を見つける
3535
for (const page of pages) {

0 commit comments

Comments
 (0)