From 11340a437207e7ff38f9c09268f56aecd3b8df0f Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 21 Dec 2022 17:16:22 +0100 Subject: [PATCH] Avoid crash from previous patch --- acorn/src/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn/src/options.js b/acorn/src/options.js index 055fdeeb0..2c1ce7e87 100644 --- a/acorn/src/options.js +++ b/acorn/src/options.js @@ -121,7 +121,7 @@ export function getOptions(opts) { if (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5 - if (opts.allowHashBang == null) + if (!opts || opts.allowHashBang == null) options.allowHashBang = options.ecmaVersion >= 14 if (isArray(options.onToken)) {