Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
deetz99 committed Jan 11, 2025
1 parent 8f5c098 commit b1ec905
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions strr-base-web/app/plugins/sbc-web-messenger.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default defineNuxtPlugin(async () => {
const msgConfig = useAppConfig().strrBaseLayer.sbcWebMsg

Check failure on line 6 in strr-base-web/app/plugins/sbc-web-messenger.client.ts

View workflow job for this annotation

GitHub Actions / strr-base-web-ci / linting-pnpm (20, 9)

'msgConfig' is assigned a value but never used

const ldFlag = getStoredFlag('enable-sbc-web-messenger')
console.log('ld flag: ', ldFlag)

Check failure on line 9 in strr-base-web/app/plugins/sbc-web-messenger.client.ts

View workflow job for this annotation

GitHub Actions / strr-base-web-ci / linting-pnpm (20, 9)

Unexpected console statement

const genesysUrl = rtc.genesysUrl
const environmentKey = rtc.genesysEnvironmentKey
Expand All @@ -17,10 +18,10 @@ export default defineNuxtPlugin(async () => {
}

const initGenesys = () => {
if (!msgConfig.enable || !ldFlag) {
console.warn('SBC Web Messenger has been disabled.')
return
}
// if (!msgConfig.enable || !ldFlag) {
// console.warn('SBC Web Messenger has been disabled.')
// return
// }

// prevent duplicate
if (window._genesysJs) {
Expand All @@ -31,7 +32,7 @@ export default defineNuxtPlugin(async () => {
// check if exists already
const scriptExists = document.querySelector(`script[src="${genesysUrl}"]`)
if (scriptExists) {
console.warn('Genesys script already exists in the document.')
console.warn('SBC Web Messenger script already exists in the document.')
return
}

Expand All @@ -41,8 +42,8 @@ export default defineNuxtPlugin(async () => {
}
window.Genesys.t = Date.now()
window.Genesys.c = {
environment: 'prod-cac1',
deploymentId: '1c8e851a-5bc8-4d50-bc7b-2f6365e04124'
environment: environmentKey as string,
deploymentId: deploymentKey as string
}
const ys = document.createElement('script')
ys.async = true
Expand Down

0 comments on commit b1ec905

Please sign in to comment.