From db0047379fac1f5c41e3055249b5272b4d8b2a77 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 22 Apr 2015 13:19:51 +0100 Subject: [PATCH] Defer creation of Pushbullet eventemitter --- social/pushbullet/57-pushbullet.js | 3 ++- social/pushbullet/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/social/pushbullet/57-pushbullet.js b/social/pushbullet/57-pushbullet.js index 5be52ef3..59e6f05b 100644 --- a/social/pushbullet/57-pushbullet.js +++ b/social/pushbullet/57-pushbullet.js @@ -41,7 +41,6 @@ module.exports = function(RED) { this.n = n; this.name = n.name; this._inputNodes = []; - this.emitter = new EventEmitter(); this.initialised = false; } @@ -55,6 +54,8 @@ module.exports = function(RED) { if (this.initialised) { return; } + this.emitter = new EventEmitter(); + this.initialised = true; var self = this; diff --git a/social/pushbullet/package.json b/social/pushbullet/package.json index c0fbb6e9..cf98bcbe 100644 --- a/social/pushbullet/package.json +++ b/social/pushbullet/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pushbullet", - "version" : "0.0.4", + "version" : "0.0.5", "description" : "A Node-RED node to send alerts via Pushbullet", "dependencies" : { "pushbullet": "1.4.*",