Skip to content

Commit d4c2b49

Browse files
committed
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
1 parent 64c886b commit d4c2b49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/phoenix/src/ansi-shell/ioutil/SignalReader.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export class SignalReader extends ProxyReader {
4040
return { value, done };
4141
}
4242

43-
const tmp_value = value;
43+
let tmp_value = value;
4444

45-
if ( ! tmp_value instanceof Uint8Array ) {
45+
if ( ! (tmp_value instanceof Uint8Array) ) {
4646
tmp_value = encoder.encode(value);
4747
}
4848

0 commit comments

Comments
 (0)