Skip to content

Commit eeb1bcd

Browse files
authored
Fix env inconsistency (#99422)
1 parent 206fca5 commit eeb1bcd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: packages/help-center/src/components/help-center-smooch.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const initSmooch = ( {
3030
jwt: string;
3131
externalId: string | undefined;
3232
} ) => {
33-
const currentEnvironment = config( 'env_id' );
34-
const isTestMode = currentEnvironment !== 'production';
33+
const currentEnvironment = config( 'env_id' ) as string;
34+
const isTestMode = ! [ 'production', 'desktop' ].includes( currentEnvironment );
3535

3636
return Smooch.init( {
3737
integrationId: isTestMode ? SMOOCH_INTEGRATION_ID_STAGING : SMOOCH_INTEGRATION_ID,

Diff for: packages/zendesk-client/src/use-attach-file.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export const useAttachFileToConversation = () => {
2222
conversationId: string;
2323
file: File;
2424
} ) => {
25-
const currentEnvironment = config( 'env_id' );
26-
const isTestMode = currentEnvironment !== 'production';
25+
const currentEnvironment = config( 'env_id' ) as string;
26+
const isTestMode = ! [ 'production', 'desktop' ].includes( currentEnvironment );
2727

2828
const integrationId = isTestMode ? SMOOCH_INTEGRATION_ID_STAGING : SMOOCH_INTEGRATION_ID;
2929
const url = isTestMode ? WIDGET_URL_STAGING : WIDGET_URL;

0 commit comments

Comments
 (0)