Skip to content

Conversation

@sabberworm
Copy link
Contributor

The following:

var parser = new OptionParser([['-e', '--example [STRING]']]);
parser.parse(['--example', '--help']);

passes "--help" as arg to the example handler even though the --help switch will be handled later on. This patch fixes this and passes undefined to the example handler function.

Note: merging this will most likely conflict with pull request #14. Ultimately it should not make much difference whether you put the arg = undefined; inside or below the if block.

@sabberworm
Copy link
Contributor Author

I’ve rebased this pull request atop the current master so it should be fine to merge automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant