Skip to content

Commit

Permalink
Fix error with displayName is missing in PackageJSON (#24246)
Browse files Browse the repository at this point in the history
Closes #24244
  • Loading branch information
karthiknadig authored Oct 4, 2024
1 parent 1b36762 commit e5b47b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/client/common/application/commands/reportIssueCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ export class ReportIssueCommandHandler implements IExtensionSingleActivationServ

const installedExtensions = getExtensions()
.filter((extension) => !extension.id.startsWith('vscode.'))
.sort((a, b) => a.packageJSON.displayName.localeCompare(b.packageJSON.displayName))
.sort((a, b) => {
if (a.packageJSON.displayName && b.packageJSON.displayName) {
return a.packageJSON.displayName.localeCompare(b.packageJSON.displayName);
}
return a.id.localeCompare(b.id);
})
.map(
(extension) =>
`|${extension.packageJSON.displayName}|${extension.id}|${extension.packageJSON.version}|`,
Expand Down

0 comments on commit e5b47b9

Please sign in to comment.