mod-build 4.0.40 → 4.0.41-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.40",
3
+ "version": "4.0.41-beta.1",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -179,9 +179,9 @@ async function embedBrandedDisplayName(apiUrl, consentCaptureObject, key, servic
179
179
  }
180
180
 
181
181
  const brandedDisplayName = getBrandedDisplayName.data.data[key];
182
- consentCaptureObject.brandedConsentCapture.tcpaStart = consentCaptureObject.brandedConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`);
183
- consentCaptureObject.brandedIncludeExclusivelyConsentCapture.tcpaStart = consentCaptureObject.brandedIncludeExclusivelyConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`);
184
- consentCaptureObject.brandedIncludeServiceConsentCapture.tcpaStart = consentCaptureObject.brandedIncludeServiceConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`).replace(/<span data-service><\/span>/g, `<span data-service>${service}</span>`);
182
+ let jsonString = JSON.stringify(consentCaptureObject);
183
+ jsonString = jsonString.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`).replace(/<span data-service><\/span>/g, `<span data-service>${service}</span>`);
184
+ consentCaptureObject = JSON.parse(jsonString);
185
185
  }
186
186
 
187
187
  const getConsentCaptureLanguage = async function(config, tempConfig) {