Fix NPE on ScheduleForm (#1410)

# What this PR does

Fixes NPE on `<ScheduleForm />` when the schedule has not been loaded.
This commit is contained in:
Rares Mardare 2023-02-27 17:21:28 +02:00 committed by GitHub
parent 04c42e2796
commit c0873007b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -241,9 +241,9 @@ class SchedulePage extends React.Component<SchedulePageProps, SchedulePageState>
</div>
</VerticalGroup>
</div>
{showEditForm && (
{showEditForm && schedule && (
<ScheduleForm
id={schedule.id}
id={scheduleId}
onUpdate={this.update}
onHide={() => {
this.setState({ showEditForm: false });