File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
npm-packages/dashboard-common/src/features/schedules/components Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,9 @@ function JobItemImpl({
8181 throw new Error ( "Could not find timestamp to run scheduled job at" ) ;
8282 }
8383 const date = new Date ( Number ( nextTs / BigInt ( 1000000 ) ) ) . toLocaleString ( ) ;
84- const udfArgsParsed : JSONValue [ ] = JSON . parse (
85- Buffer . from ( udfArgs ) . toString ( "utf8" ) ,
86- ) ;
84+ const udfArgsParsed : JSONValue [ ] = udfArgs
85+ ? JSON . parse ( Buffer . from ( udfArgs ) . toString ( "utf8" ) )
86+ : null ;
8787 if ( _id === null ) {
8888 throw new Error ( "Scheduled job id is null" ) ;
8989 }
@@ -147,7 +147,9 @@ function JobItemImpl({
147147 variant : "neutral" ,
148148 } }
149149 >
150- < MenuItem action = { ( ) => setShowArgs ( true ) } > View Arguments</ MenuItem >
150+ < MenuItem action = { ( ) => setShowArgs ( true ) } disabled = { ! udfArgs } >
151+ View Arguments
152+ </ MenuItem >
151153 < MenuItem
152154 action = { ( ) => setShowDeleteModal ( true ) }
153155 disabled = { currentlyRunning || ! canCancelJobs }
You can’t perform that action at this time.
0 commit comments