@5minds/node-red-contrib-processcube 1.5.2-feature-3ce18d-m3haj4ki → 1.5.2-feature-2b3236-m3iqw8yk

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.
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-2b3236-m3iqw8yk",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -12,6 +12,7 @@ module.exports = function (RED) {
12
12
  this.credentials.clientId = RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node);
13
13
  this.credentials.clientSecret = RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node);
14
14
 
15
+ // known issue: kann bei falschem timing zu laufzeitfehlern führen (absprache MM)
15
16
  // set the engine url
16
17
  const stopRefreshing = periodicallyRefreshEngineClient(this, n, 10000);
17
18
 
@@ -46,12 +47,16 @@ module.exports = function (RED) {
46
47
 
47
48
  node.url = newUrl;
48
49
  if (node.credentials.clientId && node.credentials.clientSecret) {
49
- this.engineClient.dispose();
50
+ if (this.engineClient) {
51
+ this.engineClient.dispose();
52
+ }
50
53
  node.engineClient = new engine_client.EngineClient(node.url, () =>
51
54
  getFreshIdentity(node.url, node)
52
55
  );
53
56
  } else {
54
- this.engineClient.dispose();
57
+ if (this.engineClient) {
58
+ this.engineClient.dispose();
59
+ }
55
60
  node.engineClient = new engine_client.EngineClient(node.url);
56
61
  }
57
62
  }