We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8ecc23 commit a5cc259Copy full SHA for a5cc259
index.js
@@ -19,6 +19,6 @@ const notifyFunc = (() => {
19
// doesn't exist, for example.
20
module.exports = (opts) => {
21
const child = notifyFunc(opts);
22
- if (child.on) child.on('error', () => {});
+ if (child && typeof child.on === 'function') child.on('error', () => {});
23
return child;
24
};
0 commit comments