Skip to content

Commit c2aa289

Browse files
committed
Allow AB users with an overriden customization to go back to the default customization
1 parent bdbd8e8 commit c2aa289

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/core/src/codewhisperer/util/customizationUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const getSelectedCustomization = (): Customization => {
113113
)
114114
const selectedCustomization = selectedCustomizationArr[AuthUtil.instance.conn.label]
115115

116-
if (selectedCustomization && selectedCustomization.name !== baseCustomization.name) {
116+
if (selectedCustomization && selectedCustomization.name !== '') {
117117
return selectedCustomization
118118
} else {
119119
const customizationFeature = FeatureConfigProvider.getFeature(Features.customizationArnOverride)

packages/core/src/test/amazonq/customizationUtil.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ describe('CodeWhisperer-customizationUtils', function () {
8585
it('Returns AB customization', async function () {
8686
sinon.stub(AuthUtil.instance, 'isValidEnterpriseSsoInUse').returns(true)
8787

88-
await setSelectedCustomization(baseCustomization)
88+
await setSelectedCustomization({
89+
arn: '',
90+
name: '',
91+
})
8992

9093
const returnedCustomization = getSelectedCustomization()
9194

0 commit comments

Comments
 (0)