Skip to content

Commit

Permalink
Replace regex match
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromml committed Nov 6, 2024
1 parent edda803 commit f91a3dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/presets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ function addHistoricalFields(fields) {
index: i,
prerequisiteTag: {
prerequisiteFunction: (tag) => {
let sourceRegex = /^source/;
if (tag.match(sourceRegex) ){
if (tag.startsWith('source') ){
// allow index 1 if there are any source tags present
if (i === 1){
return true;
Expand Down

0 comments on commit f91a3dd

Please sign in to comment.