Skip to content

Commit 07d007c

Browse files
feat: Added a saftey check if getting a appereance (not undefined) object then throw the error
1 parent 2426a49 commit 07d007c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/widget/src/hooks/Phase1/usePhase1.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ export function usePhase1({ goNext, texts, onManuallyEnterData }: IUsePhase1Prop
8989
throw new Error(WIDGET_FEATURES_EXCEPTION_MESSAGES.TEXT_CUSTOMIZATION);
9090
}
9191

92-
if (!importConfig.APPEARANCE_CUSTOMIZATION && appearanceCustomizationResult.differences.length > 0) {
92+
if (
93+
!importConfig.APPEARANCE_CUSTOMIZATION &&
94+
appearance &&
95+
appearanceCustomizationResult.differences.length > 0
96+
) {
9397
throw new Error(WIDGET_FEATURES_EXCEPTION_MESSAGES.APPEARANCE_CUSTOMIZATION);
9498
}
9599

0 commit comments

Comments
 (0)