Skip to content

Commit eac3022

Browse files
author
Chris Boe
authored
Merge pull request #486 from codeforpdx/482-calendarState
#482 Destructuring calendarState when undefined crashes toggleEditTable
2 parents 9151414 + aef67fd commit eac3022

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

contributors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ CodeforPDX:
1111
- Anthony So
1212
- Yahya Hafez
1313
- Chris Boe
14+
- Colin Bassett

src/components/ToggleEditTable/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const ToggleEditTable = ({
2525
return initValues;
2626
}, {});
2727

28-
const { dateTimeStart, dateTimeEnd } = calendarState
28+
const { dateTimeStart, dateTimeEnd } = calendarState || {};
2929

3030
return isEditing ? (
3131
<Formik

0 commit comments

Comments
 (0)