fix wrong file decoration check

This commit is contained in:
Johannes Rieken
2020-11-18 11:56:23 +01:00
parent 3d708b3c64
commit 20d2857142

View File

@@ -2720,7 +2720,7 @@ export enum ExtensionKind {
export class FileDecoration {
static validate(d: FileDecoration): void {
if (d.badge && (d.badge.length === 1 || d.badge.length === 2)) {
if (d.badge && d.badge.length !== 1 && d.badge.length !== 2) {
throw new Error(`The 'badge'-property must be undefined or a short character`);
}
if (!d.color && !d.badge && !d.tooltip) {