Skip to content

Commit

Permalink
Gracefully handle reused array being passed in (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
nowifi4u committed Jun 20, 2021
1 parent 86b1709 commit 492445a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const open = async (target, options) => {
}

let {name: app, arguments: appArguments = []} = options.app || {};
appArguments = [...appArguments];

if (Array.isArray(app)) {
return pTryEach(app, appName => open(target, {
Expand Down

0 comments on commit 492445a

Please sign in to comment.