xshell 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -180,7 +180,10 @@ export class Server {
180
180
  // send 时有可能 websocket 连接断开,抛异常,为防止循环调用 (console.error -> stdio subscriber -> throw error -> console.error)
181
181
  // 这里只能忽略错误
182
182
  try {
183
- await this.remote.send({ id, data: [typeof chunk === 'string' ? encode(chunk) : chunk] }, websocket);
183
+ await this.remote.send({
184
+ id,
185
+ data: typeof chunk === 'string' ? encode(chunk) : chunk
186
+ }, websocket);
184
187
  }
185
188
  catch { }
186
189
  };