Fix sorting start entry contributions

This commit is contained in:
Jackson Kearl 2021-06-30 10:59:26 -07:00
parent 8a1e7de8f5
commit ee6587fc10
No known key found for this signature in database
GPG key ID: DA09A59C409FC400

View file

@ -670,9 +670,8 @@ export class GettingStartedService extends Disposable implements IGettingStarted
}
private registerNewMenuItem(categoryDescriptor: IGettingStartedNewMenuEntryDescriptor) {
let insertIndex = (this.newMenuItems.findIndex(entry => categoryDescriptor.category < entry.category));
if (insertIndex === -1) { insertIndex = this.newMenuItems.length; }
this.newMenuItems.splice(insertIndex, 0, categoryDescriptor);
this.newMenuItems.push(categoryDescriptor);
this.newMenuItems.sort((a, b) => b.category - a.category);
this._onDidAddNewEntry.fire();
}