Skip to content

Commit c6f4c34

Browse files
committed
fiz no window, zero instance
1 parent 1ecb593 commit c6f4c34

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/webapp/app/components/schedules/ScheduleInspector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function ScheduleInspector({
145145
</Property.Item>
146146
<Property.Item>
147147
<Property.Label>Window</Property.Label>
148-
<Property.Value>{schedule.window}</Property.Value>
148+
<Property.Value>{schedule.window ?? "-"}</Property.Value>
149149
</Property.Item>
150150
<Property.Item className="gap-1">
151151
<Property.Label>Environment</Property.Label>

apps/webapp/app/presenters/v3/ViewSchedulePresenter.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class ViewSchedulePresenter {
8787
const instance = schedule.instances.find(
8888
(instance) => instance.environmentId === environmentId
8989
);
90-
if (!instance) {
90+
if (!instance && schedule.instances.length > 0) {
9191
return;
9292
}
9393

@@ -97,7 +97,7 @@ export class ViewSchedulePresenter {
9797
timezone: schedule.timezone,
9898
deduplicationKey: schedule.deduplicationKey,
9999
environmentId,
100-
schedulePhase: instance.schedulePhase,
100+
schedulePhase: instance?.schedulePhase ?? null,
101101
phaseSecret: env.ENCRYPTION_KEY,
102102
windowDurationSeconds: schedule.windowDurationSeconds,
103103
windowPercentage: schedule.windowPercentage,

0 commit comments

Comments
 (0)