Skip to content

Commit 44c440c

Browse files
committed
Handle non-match in date parsing.
1 parent 5f63eff commit 44c440c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gx-util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ function getImageArks(doc) {
658658
*/
659659
function normalizeDate(origDate) {
660660
let match = origDate.match(/([A-Za-z]+) [ 0]*([0-9]+), *([0-9][0-9][0-9][0-9])/);
661-
if (match.length > 3) {
661+
if (match && match.length > 3) {
662662
return match[2] + " " + match[1] + " " + match[3];
663663
}
664664
return origDate;

0 commit comments

Comments
 (0)