Skip to content

Commit

Permalink
Change console.error to console.warn as it breaks Smokey tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGDS committed Jan 25, 2023
1 parent 03b360e commit 7ab0f09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
useful summary for people upgrading their application, not a replication
of the commit log.

## Unreleased

* Change console.error to console.warn as it breaks Smokey tests ([PR #3210](https://github.com/alphagov/govuk_publishing_components/pull/3210))

## 34.5.0

* Catch errors when modules initialised ([PR #3190](https://github.com/alphagov/govuk_publishing_components/pull/3190))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ window.GOVUK.loadAnalytics = {
window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {}

if (typeof window.GOVUK.analyticsGa4.core === 'undefined') {
console.error('load-analytics.js: window.GOVUK.analyticsGa4.core was not found - has ./analytics-ga4.js been imported?')
console.warn('load-analytics.js: window.GOVUK.analyticsGa4.core was not found - has ./analytics-ga4.js been imported?')
return
}

Expand All @@ -144,7 +144,7 @@ window.GOVUK.loadAnalytics = {
}

if (!this.environment) {
console.error('load-analytics.js: environment for GA4 not recognised - ' + this.environment + ' on ' + currentDomain)
console.warn('load-analytics.js: environment for GA4 not recognised - ' + this.environment + ' on ' + currentDomain)
return
}

Expand Down

0 comments on commit 7ab0f09

Please sign in to comment.