From 0f64847351023af1589e86aff8132fb7256a2650 Mon Sep 17 00:00:00 2001 From: javacs3 Date: Sun, 5 Apr 2020 12:49:04 +0800 Subject: [PATCH] fix lint error --- src/public/Terminal.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/public/Terminal.ts b/src/public/Terminal.ts index 216bc147..5fa4d251 100644 --- a/src/public/Terminal.ts +++ b/src/public/Terminal.ts @@ -203,7 +203,7 @@ class BufferApiView implements IBufferApi { public get type(): 'normal' | 'alternate' { if (this._buffers.normal === this._buffer) { return 'normal'; } - else if (this._buffers.alt === this._buffer) { return 'alternate'; } + if (this._buffers.alt === this._buffer) { return 'alternate'; } throw new Error('Unknown buffer type'); } public get cursorY(): number { return this._buffer.y; } @@ -232,8 +232,8 @@ class BufferNamespaceApi implements IBufferNamespaceApi { public get active(): IBufferApi { if (this._buffers.active === this._buffers.normal) { return this.normal; } - else if (this._buffers.active === this._buffers.alt) { return this.alternate; } - throw new Error('Active Buffer is neither normal nor alternate'); + if (this._buffers.active === this._buffers.alt) { return this.alternate; } + throw new Error('Active buffer is neither normal nor alternate'); } public get normal(): IBufferApi { return this._normal.init(this._buffers.normal, this._buffers); } public get alternate(): IBufferApi { return this._alternate.init(this._buffers.alt, this._buffers); }