Skip to content

Commit

Permalink
fix #14662
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Nov 5, 2021
1 parent 04640dc commit 610d435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dependencies/CommonJsFullRequireDependency.js
Expand Up @@ -121,7 +121,7 @@ CommonJsFullRequireDependency.Template = class CommonJsFullRequireDependencyTemp
requireExpr =
dep.asiSafe === true
? `(${requireExpr}${access})`
: `${requireExpr}${access})`;
: `${requireExpr}${access}`;
}
}
source.replace(dep.range[0], dep.range[1] - 1, requireExpr);
Expand Down
3 changes: 3 additions & 0 deletions test/cases/parsing/asi/index.js
Expand Up @@ -41,5 +41,8 @@ it("should respect asi flag", () => {
return callme()
})()

;(donotcallme)
require("./b.json").prop

expect(getCount()).toBe(29)
});

0 comments on commit 610d435

Please sign in to comment.