mirror of
https://github.com/Microsoft/vscode
synced 2024-10-13 14:57:14 +00:00
Settings editor - fix NPE rendering settings with no description
This commit is contained in:
parent
adf837e769
commit
c259ee91ec
|
@ -1025,7 +1025,7 @@ export class SettingsRenderer implements ITreeRenderer {
|
|||
|
||||
const result = this.renderValue(element, isSelected, templateId, <ISettingItemTemplate>template);
|
||||
|
||||
const firstLineOverflows = renderedDescription.firstElementChild.clientHeight > 18;
|
||||
const firstLineOverflows = renderedDescription.firstElementChild && renderedDescription.firstElementChild.clientHeight > 18;
|
||||
const hasExtraLines = renderedDescription.childElementCount > 1;
|
||||
const needsManualOverflowIndicator = (hasExtraLines || result.overflows) && !firstLineOverflows && !isSelected;
|
||||
DOM.toggleClass(template.descriptionElement, 'setting-item-description-artificial-overflow', needsManualOverflowIndicator);
|
||||
|
|
Loading…
Reference in a new issue