diff --git a/lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js b/lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js index e59357b6b992..46e944f63db6 100644 --- a/lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js +++ b/lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js @@ -83,7 +83,21 @@ function query( slug, id, options, clbk ) { info = ratelimit( response.headers ); debug( 'Rate limit: %d', info.limit ); debug( 'Rate limit remaining: %d', info.remaining ); - debug( 'Rate limit reset: %s', (new Date( info.reset*1000 )).toISOString() ); + + var resetDate; + var time; + + if ( typeof info.reset === 'number' ) { + resetDate = new Date( info.reset * 1000 ); + time = resetDate.getTime(); + + debug( + 'Rate limit reset: %s', + ( isNaN( time ) ? 'invalid timestamp' : resetDate.toISOString() ) + ); + } else { + debug( 'Rate limit reset: not provided' ); + } if ( error ) { return clbk( error, info );