@5minds/node-red-contrib-processcube 1.5.2-feature-3ce18d-m3haj4ki → 1.5.2-feature-8f4ce8-m3igte5w

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.5.2-feature-3ce18d-m3haj4ki",
3
+ "version": "1.5.2-feature-8f4ce8-m3igte5w",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -46,12 +46,16 @@ module.exports = function (RED) {
46
46
 
47
47
  node.url = newUrl;
48
48
  if (node.credentials.clientId && node.credentials.clientSecret) {
49
- this.engineClient.dispose();
49
+ if (this.engineClient) {
50
+ this.engineClient.dispose();
51
+ }
50
52
  node.engineClient = new engine_client.EngineClient(node.url, () =>
51
53
  getFreshIdentity(node.url, node)
52
54
  );
53
55
  } else {
54
- this.engineClient.dispose();
56
+ if (this.engineClient) {
57
+ this.engineClient.dispose();
58
+ }
55
59
  node.engineClient = new engine_client.EngineClient(node.url);
56
60
  }
57
61
  }