Skip to content

Commit

Permalink
Support environments without process.argv
Browse files Browse the repository at this point in the history
like Edge Runtime
  • Loading branch information
copini committed Jul 6, 2023
1 parent e070f0d commit 898a02c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/system/has-flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SOFTWARE.
'use strict';

module.exports = function(flag, argv) {
argv = argv || process.argv;
argv = argv || process.argv || [];

var terminatorPos = argv.indexOf('--');
var prefix = /^-{1,2}/.test(flag) ? '' : '--';
Expand Down

0 comments on commit 898a02c

Please sign in to comment.