Skip to content

Commit e8db514

Browse files
committed
Update
1 parent 53de3bf commit e8db514

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/commands/image/updateImage/UpdateRegistryAndSecretsStep.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export class UpdateRegistryAndSecretsStep extends AzureWizardExecuteStep<UpdateI
5656
}
5757

5858
function sortAlphabeticallyByKey<T extends Secret | RegistryCredentials>(a: T, b: T, key: keyof T): number {
59+
if (typeof a[key] !== 'string' || typeof b[key] !== 'string') {
60+
return 0;
61+
}
62+
5963
const valOne = nonNullProp(a, key) as string;
6064
const valTwo = nonNullProp(b, key) as string;
6165
return valOne.localeCompare(valTwo);

0 commit comments

Comments
 (0)