@5minds/node-red-contrib-processcube 1.5.8-develop-cde510-m3r05cmh → 1.5.8-develop-e2b8a1-m3r3ow1h

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,13 +18,6 @@ module.exports = function (RED) {
18
18
 
19
19
  const engine = RED.nodes.getNode(config.engine);
20
20
 
21
- const client = engine.engineClient;
22
-
23
- if (!client) {
24
- node.error('No engine configured.');
25
- return;
26
- }
27
-
28
21
  var eventEmitter = flowContext.get('emitter');
29
22
 
30
23
  if (!eventEmitter) {
@@ -32,7 +25,7 @@ module.exports = function (RED) {
32
25
  eventEmitter = flowContext.get('emitter');
33
26
  }
34
27
 
35
- const engineEventEmitter = node.engine.eventEmitter;
28
+ const engineEventEmitter = engine.eventEmitter;
36
29
 
37
30
  engineEventEmitter.on('engine-client-dispose', () => {
38
31
  node.engine.engineClient.externalTasks.removeSubscription(subscription, node.engine.identity);
@@ -44,6 +37,12 @@ module.exports = function (RED) {
44
37
  });
45
38
 
46
39
  const register = async () => {
40
+ const client = engine.engineClient;
41
+
42
+ if (!client) {
43
+ node.error('No engine configured.');
44
+ return;
45
+ }
47
46
  const etwCallback = async (payload, externalTask) => {
48
47
  const saveHandleCallback = (data, callback) => {
49
48
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.5.8-develop-cde510-m3r05cmh",
3
+ "version": "1.5.8-develop-e2b8a1-m3r3ow1h",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {