fix writeUtf8 for ssh player
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
04a71800fa
commit
e32cceb1b4
|
@ -1108,10 +1108,10 @@
|
|||
|
||||
function writeXTerm(data) {
|
||||
if (term == null) return;
|
||||
if (typeof data == 'string') {
|
||||
term.writeUtf8(data);
|
||||
if (term.writeUtf8) {
|
||||
if (typeof data == 'string') { term.writeUtf8(data); } else { term.writeUtf8(new Uint8Array(data)); }
|
||||
} else {
|
||||
term.writeUtf8(new Uint8Array(data));
|
||||
if (typeof data == 'string') { term.write(data); } else { term.write(new Uint8Array(data)); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,10 +181,10 @@
|
|||
}
|
||||
|
||||
function tunnelUpdate(data) {
|
||||
if (typeof data == 'string') {
|
||||
term.writeUtf8(data);
|
||||
if (term.writeUtf8) {
|
||||
if (typeof data == 'string') { term.writeUtf8(data); } else { term.writeUtf8(new Uint8Array(data)); }
|
||||
} else {
|
||||
term.writeUtf8(new Uint8Array(data));
|
||||
if (typeof data == 'string') { term.write(data); } else { term.write(new Uint8Array(data)); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue