Skip to content

Commit

Permalink
Merge pull request #376 from MoTrPAC/copilot-autofix-alert-ga4-missin…
Browse files Browse the repository at this point in the history
…g-regex-anchor

Fix code scanning alert no. 2: Missing regular expression anchor
  • Loading branch information
jimmyzhen authored Oct 31, 2024
2 parents 8d7e8c3 + ea850a0 commit ddf21e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GoogleAnalytics/googleAnalytics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const trackingId = () => {
let analyticsTrackerHostname = document.location.hostname;

// match hostname to google analytics domain identified for tracker
if (/^(www\.)?motrpac(-[a-z]+)?.org/.test(analyticsTrackerHostname)) {
if (/^(www\.)?motrpac(-[a-z]+)?.org$/.test(analyticsTrackerHostname)) {
// production app
analyticsTrackerHostname = 'www.motrpac-data.org';
} else {
Expand Down

0 comments on commit ddf21e0

Please sign in to comment.