From 02afd2dc397365198f7fa30e6f286f084cd23fb9 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Thu, 1 Oct 2020 08:51:34 -0700 Subject: [PATCH] Fix error when clicking empty dropdown (#12684) * vBump notebooks to get latest CU6 version of book * Don't throw error when clicking on empty select box * undo --- src/vs/base/browser/ui/selectBox/selectBoxCustom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index 6c48e65889..7d92e7310f 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -715,8 +715,8 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi } }); + container.innerHTML = this.options[longest]?.text + (!!this.options[longest]?.decoratorRight ? (this.options[longest].decoratorRight + ' ') : ''); // {{ SQL CARBON EDIT }} Don't error if no option found (empty list) - container.innerHTML = this.options[longest].text + (!!this.options[longest].decoratorRight ? (this.options[longest].decoratorRight + ' ') : ''); elementWidth = dom.getTotalWidth(container); }