Skip to content

Commit

Permalink
fix: Correct inverted instanceof check in SignalReader.read()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
AtkinsSJ committed May 2, 2024
1 parent 64c886b commit d4c2b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/phoenix/src/ansi-shell/ioutil/SignalReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d4c2b49

Please sign in to comment.