Fix NPEs on buffer line and windowsPty option

This commit is contained in:
Daniel Imms
2023-06-09 08:47:17 -07:00
parent 380e6805e8
commit ffadc0b31d
2 changed files with 10 additions and 4 deletions
+4
View File
@@ -178,12 +178,16 @@ export class OptionsService extends Disposable implements IOptionsService {
if (value <= 0) {
throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);
}
break;
case 'rows':
case 'cols':
if (!value && value !== 0) {
throw new Error(`${key} must be numeric, value: ${value}`);
}
break;
case 'windowsPty':
value = value ?? {};
break;
}
return value;
}