Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbo committed Dec 2, 2023
1 parent 5698e8e commit 39f6ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gx-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function getRecordYear(gx) {
// Check documents for NBX with <DAT>publication date</DAT>
if (!year && gx.documents) {
for (let document of gx.documents) {
if (document.text && document.text.contains("<NBX>")) {
if (document.text && document.text.includes("<NBX>")) {
let match = document.text.match(/<DAT>([^<]*)<\/DAT>/);
if (match) {
year = parseYearFromDateString(match[1]);
Expand Down

0 comments on commit 39f6ccd

Please sign in to comment.