Comparing version 0.9.0-beta28 to 0.9.0-beta29
@@ -234,2 +234,5 @@ "use strict"; | ||
UnixTerminal.prototype.resize = function (cols, rows) { | ||
if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) { | ||
throw new Error('resizing must be done using positive cols and rows'); | ||
} | ||
pty.resize(this._fd, cols, rows); | ||
@@ -236,0 +239,0 @@ this._cols = cols; |
@@ -126,3 +126,3 @@ "use strict"; | ||
var _this = this; | ||
if (cols <= 0 || rows <= 0) { | ||
if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) { | ||
throw new Error('resizing must be done using positive cols and rows'); | ||
@@ -129,0 +129,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.9.0-beta28", | ||
"version": "0.9.0-beta29", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "main": "./lib/index.js", |
@@ -260,2 +260,5 @@ /** | ||
public resize(cols: number, rows: number): void { | ||
if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) { | ||
throw new Error('resizing must be done using positive cols and rows'); | ||
} | ||
pty.resize(this._fd, cols, rows); | ||
@@ -262,0 +265,0 @@ this._cols = cols; |
@@ -145,3 +145,3 @@ /** | ||
public resize(cols: number, rows: number): void { | ||
if (cols <= 0 || rows <= 0) { | ||
if (cols <= 0 || rows <= 0 || isNaN(cols) || isNaN(rows) || cols === Infinity || rows === Infinity) { | ||
throw new Error('resizing must be done using positive cols and rows'); | ||
@@ -148,0 +148,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1079708
3450