Skip to content

Commit 6440718

Browse files
committed
fix: varname
1 parent 6c7a856 commit 6440718

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/log-update.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const create = (stream: Writable, {showCursor = false} = {}): LogUpdate => {
3131
const visibleCount = nextCount - 1;
3232

3333
if (output === '\n' || previousOutput.length === 0) {
34-
stream.write(ansiEscapes.eraseLines(prevCount) + output);
34+
stream.write(ansiEscapes.eraseLines(previousCount) + output);
3535
previousOutput = output;
3636
previousLines = nextLines;
3737
return;
@@ -41,15 +41,15 @@ const create = (stream: Writable, {showCursor = false} = {}): LogUpdate => {
4141
const buffer: string[] = [];
4242

4343
// Clear extra lines if the current content's line count is lower than the previous.
44-
if (nextCount < prevCount) {
44+
if (nextCount < previousCount) {
4545
buffer.push(
4646
// Erases the trailing lines and the final newline slot.
47-
ansiEscapes.eraseLines(prevCount - nextCount + 1),
47+
ansiEscapes.eraseLines(previousCount - nextCount + 1),
4848
// Positions cursor to the top of the rendered output.
4949
ansiEscapes.cursorUp(visibleCount),
5050
);
5151
} else {
52-
buffer.push(ansiEscapes.cursorUp(prevCount - 1));
52+
buffer.push(ansiEscapes.cursorUp(previousCount - 1));
5353
}
5454

5555
for (let i = 0; i < visibleCount; i++) {

0 commit comments

Comments
 (0)