We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20f5d8e commit a0c443dCopy full SHA for a0c443d
1 file changed
packages/protocol/src/browser/modules/child_process.ts
@@ -32,12 +32,14 @@ export class CP {
32
if (typeof options === "function") {
33
callback = options;
34
}
35
- // @ts-ignore not sure how to make this work.
36
- callback(
37
- error,
38
- useBuffer(options) ? Buffer.from(stdout) : stdout,
39
- useBuffer(options) ? Buffer.from(stderr) : stderr,
40
- );
+ if (callback) {
+ // @ts-ignore not sure how to make this work.
+ callback(
+ error,
+ useBuffer(options) ? Buffer.from(stdout) : stdout,
+ useBuffer(options) ? Buffer.from(stderr) : stderr,
41
+ );
42
+ }
43
});
44
45
// @ts-ignore TODO: not fully implemented
0 commit comments