Skip to content

Commit

Permalink
Fix default for allowHashBang option
Browse files Browse the repository at this point in the history
FIX: Fix a bug that caused `allowHashBang` to be set to false when not provided,
even with `ecmaVersion >= 14`.

Issue #1172
  • Loading branch information
marijnh committed Dec 21, 2022
1 parent ae85582 commit e708a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acorn/src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function getOptions(opts) {
if (options.allowReserved == null)
options.allowReserved = options.ecmaVersion < 5

if (options.allowHashBang == null)
if (opts.allowHashBang == null)
options.allowHashBang = options.ecmaVersion >= 14

if (isArray(options.onToken)) {
Expand Down

0 comments on commit e708a22

Please sign in to comment.