Catch cases of `! Expires:` field with no value

This commit is contained in:
Raymond Hill 2023-11-22 13:40:49 -05:00
parent bda46d5cc7
commit 9ce958432d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ const stringIsNotEmpty = s => typeof s === 'string' && s !== '';
const parseExpires = s => {
const matches = s.match(/(\d+)\s*([dhm]?)/i);
if ( matches === null ) { return 0; }
if ( matches === null ) { return; }
let updateAfter = parseInt(matches[1], 10);
if ( matches[2] === 'h' ) {
updateAfter = Math.max(updateAfter, 4) / 24;