verteilen-core 1.2.19 → 1.2.20

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.
@@ -191,21 +191,25 @@ class ServerDetail {
191
191
  };
192
192
  shell_open = (socket, uuid) => {
193
193
  this.websocket_manager.shell_open(uuid);
194
- if (this.shellBind.has(uuid)) {
195
- this.shellBind.get(uuid).push(this.feedback.socket);
196
- }
197
- else {
198
- this.shellBind.set(uuid, [this.feedback.socket]);
194
+ if (this.feedback.socket) {
195
+ if (this.shellBind.has(uuid)) {
196
+ this.shellBind.get(uuid).push(this.feedback.socket);
197
+ }
198
+ else {
199
+ this.shellBind.set(uuid, [this.feedback.socket]);
200
+ }
199
201
  }
200
202
  };
201
203
  shell_close = (socket, uuid) => {
202
204
  this.websocket_manager.shell_close(uuid);
203
- if (this.shellBind.has(uuid)) {
204
- const p = this.shellBind.get(uuid);
205
- const index = p.findIndex(x => x == this.feedback.socket);
206
- if (index != -1)
207
- p.splice(index, 1);
208
- this.shellBind.set(uuid, p);
205
+ if (this.feedback.socket) {
206
+ if (this.shellBind.has(uuid)) {
207
+ const p = this.shellBind.get(uuid);
208
+ const index = p.findIndex(x => x == this.feedback.socket);
209
+ if (index != -1)
210
+ p.splice(index, 1);
211
+ this.shellBind.set(uuid, p);
212
+ }
209
213
  }
210
214
  };
211
215
  shell_folder = (socket, uuid, path) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verteilen-core",
3
- "version": "1.2.19",
3
+ "version": "1.2.20",
4
4
  "license": "MIT",
5
5
  "homepage": "https://verteilen.github.io/wiki/",
6
6
  "author": "Elly",
@@ -278,19 +278,23 @@ export class ServerDetail {
278
278
  }
279
279
  shell_open = (socket:any, uuid: string) => {
280
280
  this.websocket_manager!.shell_open(uuid)
281
- if(this.shellBind.has(uuid)){
282
- this.shellBind.get(uuid).push(this.feedback.socket)
283
- }else{
284
- this.shellBind.set(uuid, [this.feedback.socket])
281
+ if(this.feedback.socket){
282
+ if(this.shellBind.has(uuid)){
283
+ this.shellBind.get(uuid).push(this.feedback.socket)
284
+ }else{
285
+ this.shellBind.set(uuid, [this.feedback.socket])
286
+ }
285
287
  }
286
288
  }
287
289
  shell_close = (socket:any, uuid: string) => {
288
290
  this.websocket_manager!.shell_close(uuid)
289
- if(this.shellBind.has(uuid)){
290
- const p:Array<any> = this.shellBind.get(uuid)
291
- const index = p.findIndex(x => x == this.feedback.socket)
292
- if(index != -1) p.splice(index, 1)
293
- this.shellBind.set(uuid, p)
291
+ if(this.feedback.socket){
292
+ if(this.shellBind.has(uuid)){
293
+ const p:Array<any> = this.shellBind.get(uuid)
294
+ const index = p.findIndex(x => x == this.feedback.socket)
295
+ if(index != -1) p.splice(index, 1)
296
+ this.shellBind.set(uuid, p)
297
+ }
294
298
  }
295
299
  }
296
300
  shell_folder = (socket:any, uuid: string, path:string) => {