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
This commit is contained in:
Sam Atkins 2024-05-01 10:52:56 +01:00
parent 64c886bfeb
commit d4c2b492ef

View File

@ -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);
}