Skip to content

Commit 5410140

Browse files
fix: guard against invalid Date in dispatch-workflow query
1 parent 661a8bf commit 5410140

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib

lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ function query( slug, id, options, clbk ) {
8383
info = ratelimit( response.headers );
8484
debug( 'Rate limit: %d', info.limit );
8585
debug( 'Rate limit remaining: %d', info.remaining );
86-
debug( 'Rate limit reset: %s', ( isFinite( info.reset ) ? new Date( info.reset*1000 ) : new Date() ).toISOString() );
86+
var reset = ( isFinite( info.reset ) ) ? new Date( info.reset*1000 ) : new Date();
87+
debug( 'Rate limit reset: %s', reset.toISOString() );
8788

8889
if ( error ) {
8990
return clbk( error, info );

0 commit comments

Comments
 (0)