From ee6587fc1015e5e6ca8fdf78532ef111491a767d Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Wed, 30 Jun 2021 10:59:26 -0700 Subject: [PATCH] Fix sorting start entry contributions --- .../welcome/gettingStarted/browser/gettingStartedService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts index 0cddbfb3f72..c74ad120827 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService.ts @@ -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(); }