bugfix
This commit is contained in:
parent
48d50210fb
commit
d4e00576dc
2
index.js
2
index.js
|
@ -5,6 +5,8 @@ module.exports.create = function (opts) {
|
||||||
|
|
||||||
if (!opts.onMessage && !opts.onmessage) {
|
if (!opts.onMessage && !opts.onmessage) {
|
||||||
machine = new (require('events').EventEmitter)();
|
machine = new (require('events').EventEmitter)();
|
||||||
|
} else {
|
||||||
|
machine = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
machine.onMessage = opts.onmessage || opts.onMessage;
|
machine.onMessage = opts.onmessage || opts.onMessage;
|
||||||
|
|
Loading…
Reference in New Issue