diff --git a/web/lib/service/sprig.ts b/web/lib/service/sprig.ts index 9353020d..b827253f 100644 --- a/web/lib/service/sprig.ts +++ b/web/lib/service/sprig.ts @@ -3,6 +3,7 @@ // Integrate Sprig import { ENV_CONFIG } from 'common/envs/constants' +import { PROD_CONFIG } from 'common/envs/prod' try { ;(function (l, e, a, p) { @@ -18,7 +19,7 @@ try { a.async = 1 a.src = e + '?id=' + S.appId p = l.getElementsByTagName('script')[0] - p.parentNode.insertBefore(a, p) + ENV_CONFIG.domain === PROD_CONFIG.domain && p.parentNode.insertBefore(a, p) })(document, 'https://cdn.sprig.com/shim.js', ENV_CONFIG.sprigEnvironmentId) } catch (error) { console.log('Error initializing Sprig, please complain to Barak', error)