Skip to content

Commit

Permalink
still allow overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakeii committed Dec 5, 2024
1 parent 133db01 commit 814ab7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion common/app/common/configuration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ class GuardianConfiguration extends GuLogging {
if (environment.isDev) configuration.getStringProperty("commercial.overrideCommercialBundleUrl")
else None

def getBundlePath = configuration.getMandatoryStringProperty("commercial.bundlePath")
}

object journalism {
Expand Down
11 changes: 5 additions & 6 deletions common/app/views/support/JavaScriptPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ object JavaScriptPage {

val commercialBundleUrl =
if (ActiveExperiments.isParticipating(CommercialBundleUpdater)(request))
JsString(CommercialBundle.bundleUrl)
Configuration.commercial.overrideCommercialBundleUrl
.getOrElse(CommercialBundle.bundleUrl)
else
JsString(
Configuration.commercial.overrideCommercialBundleUrl
.getOrElse(assetURL("javascripts/commercial/graun.standalone.commercial.js")),
)
Configuration.commercial.overrideCommercialBundleUrl
.getOrElse(assetURL("javascripts/commercial/graun.standalone.commercial.js"))

javascriptConfig ++ config ++ commercialMetaData ++ journalismMetaData ++ Map(
("edition", JsString(edition.id)),
Expand All @@ -101,7 +100,7 @@ object JavaScriptPage {
("brazeApiKey", JsString(Configuration.braze.apiKey)),
("ipsosTag", JsString(ipsos)),
("isAdFree", JsBoolean(isAdFree(request))),
("commercialBundleUrl", commercialBundleUrl),
("commercialBundleUrl", JsString(commercialBundleUrl)),
("stage", JsString(Configuration.environment.stage)),
)
}.toMap
Expand Down

0 comments on commit 814ab7c

Please sign in to comment.