Skip to content

Commit 74bb01a

Browse files
committed
Update index.js
1 parent 262d955 commit 74bb01a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function isFunction(value) {
177177
// * onmessage: callable, // callback for `on('message')` event.
178178
*```
179179
*/
180-
export const spawning = Sys.spawning = function (command, argument = [], progressOptions = null, options = { stdio: 'pipe', }) {
180+
export const spawning = Sys.spawning = function (command, argument, progressOptions, options) {
181181
return new Promise((resolve, reject) => {
182182
options = options || {
183183
stdio: 'pipe',
@@ -191,7 +191,7 @@ export const spawning = Sys.spawning = function (command, argument = [], progres
191191
if (typeof progressOptions == 'object' && !isFunction(progressOptions)) {
192192
options = Object.assign(options, progressOptions);
193193
progress = options.onprogress || null;
194-
} else if (!isFunction(progressOptions)) {
194+
} else if (isFunction(options.onprogress)) {
195195
progress = options.onprogress || null;
196196
}
197197

0 commit comments

Comments
 (0)