diff --git a/src/public/Terminal.ts b/src/public/Terminal.ts index 70a77fd200..4b89561461 100644 --- a/src/public/Terminal.ts +++ b/src/public/Terminal.ts @@ -181,8 +181,8 @@ export class Terminal implements ITerminalApi { private _verifyIntegers(...values: number[]): void { values.forEach(value => { - if (value % 1 !== 0) { - throw new Error('This API does not accept floating point numbers'); + if (value === Infinity || value === NaN || value % 1 !== 0) { + throw new Error('This API only accepts integers'); } }); }