Skip to content

Commit 0a4824a

Browse files
committed
Clones options object to avoid mutating the original
1 parent 57f49ee commit 0a4824a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function parse(command, args, options) {
116116
}
117117

118118
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
119-
options = options || {};
119+
options = options ? assign({}, options) : {}; // Clone object to avoid changing the original
120120

121121
// Build our parsed object
122122
parsed = {

0 commit comments

Comments
 (0)