Skip to content

Commit a5cc259

Browse files
committed
Fix BSD!
1 parent f8ecc23 commit a5cc259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ const notifyFunc = (() => {
1919
// doesn't exist, for example.
2020
module.exports = (opts) => {
2121
const child = notifyFunc(opts);
22-
if (child.on) child.on('error', () => {});
22+
if (child && typeof child.on === 'function') child.on('error', () => {});
2323
return child;
2424
};

0 commit comments

Comments
 (0)