Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: missing stream.getWindowSize error #94 (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
z-hao-wang authored Dec 17, 2020
1 parent 67b0247 commit 541ba18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/screen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function termwidth(stream: any): number {
if (!stream.isTTY) {
if (!stream.isTTY || !stream.getWindowSize) {
return 80
}
const width = stream.getWindowSize()[0]
Expand Down

0 comments on commit 541ba18

Please sign in to comment.