From d4c2b492ef4864804776d3cb7d24797fdc536886 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 1 May 2024 10:52:56 +0100 Subject: [PATCH] fix: Correct inverted instanceof check in SignalReader.read() Also make tmp_value non-const because it gets modified later. Solves these eslint issues: /puter/packages/phoenix/src/ansi-shell/ioutil/SignalReader.js 45:14 error Unexpected negating the left operand of 'instanceof' operator no-unsafe-negation 46:13 error 'tmp_value' is constant no-const-assign --- packages/phoenix/src/ansi-shell/ioutil/SignalReader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/phoenix/src/ansi-shell/ioutil/SignalReader.js b/packages/phoenix/src/ansi-shell/ioutil/SignalReader.js index b7eafc86..17ea234b 100644 --- a/packages/phoenix/src/ansi-shell/ioutil/SignalReader.js +++ b/packages/phoenix/src/ansi-shell/ioutil/SignalReader.js @@ -40,9 +40,9 @@ export class SignalReader extends ProxyReader { return { value, done }; } - const tmp_value = value; + let tmp_value = value; - if ( ! tmp_value instanceof Uint8Array ) { + if ( ! (tmp_value instanceof Uint8Array) ) { tmp_value = encoder.encode(value); }