Skip to content

Commit

Permalink
Fix error with displayName is missing in PackageJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Oct 4, 2024
1 parent d072503 commit 60b637a
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 60b637a

Please sign in to comment.