Skip to content

Commit 16837fc

Browse files
authored
Use the providerKey for loading the intercom script
1 parent a2f8bb6 commit 16837fc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/providers/intercom.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare global {
1212
}
1313

1414
/* eslint-disable */
15-
const loadScript = (): boolean => {
15+
const loadScript = (appId: string): boolean => {
1616
if (window.Intercom) return false
1717
;(function() {
1818
var w = window
@@ -34,7 +34,7 @@ const loadScript = (): boolean => {
3434
var s = d.createElement('script')
3535
s.type = 'text/javascript'
3636
s.async = true
37-
s.src = `${domain}/widget/3qmk5gyg`
37+
s.src = `${domain}/widget/${appId}`
3838
var x = d.getElementsByTagName('script')[0]
3939
x.parentNode?.insertBefore(s, x)
4040
}
@@ -52,7 +52,7 @@ const load = ({
5252
providerKey: string
5353
setState: (state: State) => void
5454
}): boolean => {
55-
const loaded = loadScript()
55+
const loaded = loadScript(providerKey)
5656

5757
// Continue as long as userlike hasn’t already been initialised.
5858
if (loaded) {

0 commit comments

Comments
 (0)