Skip to content

Commit

Permalink
Support environments without process.argv (#44)
Browse files Browse the repository at this point in the history
like Edge Runtime
  • Loading branch information
copini committed Jul 10, 2023
1 parent efde241 commit 5263348
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 5263348

Please sign in to comment.