File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
apps/web/src/components/RunExperimentModal Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,11 @@ export function RunExperimentModal({
9292 }
9393
9494 // Validation: if using logs source, need at least 1 log
95- if ( source === 'logs' && ( ! formPayload . toLine || formPayload . toLine < 1 ) ) {
95+ if (
96+ source === 'logs' &&
97+ ( formPayload . toLine === undefined ||
98+ formPayload . toLine < ( formPayload . fromLine ?? 0 ) )
99+ ) {
96100 toast ( {
97101 title : 'Error' ,
98102 description : 'Please select at least 1 log' ,
@@ -104,7 +108,8 @@ export function RunExperimentModal({
104108 // Validation: if using manual source, need at least 1 run
105109 if (
106110 source === 'manual' &&
107- ( ! formPayload . toLine || formPayload . toLine < 0 )
111+ ( formPayload . toLine === undefined ||
112+ formPayload . toLine < ( formPayload . fromLine ?? 0 ) )
108113 ) {
109114 toast ( {
110115 title : 'Error' ,
You can’t perform that action at this time.
0 commit comments