Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

Commit

Permalink
move the eventEmitter.call inside the class function
Browse files Browse the repository at this point in the history
newer versions of node cause `this` to be undefined when it's called
  • Loading branch information
allanhortle committed Aug 31, 2016
1 parent b65f608 commit 989a2d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Service.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'user strict';
'use strict';

var util = require("util"),
events = require("events");

function Service() {}
function Service() {
events.EventEmitter.call(this);
}

events.EventEmitter.call(this);

util.inherits(Service, events.EventEmitter);

Expand Down

0 comments on commit 989a2d8

Please sign in to comment.