Skip to content

Commit bc05ee3

Browse files
committed
Fix parser hooks
1 parent 6922a5e commit bc05ee3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ class Parser extends Tapable {
14251425
walkNewExpression(expression) {
14261426
const callee = this.evaluateExpression(expression.callee);
14271427
if(callee.isIdentifier()) {
1428-
const hook = this.hooks.new.for(callee.identifier);
1428+
const hook = this.hooks.new.get(callee.identifier);
14291429
if(hook !== undefined) {
14301430
const result = hook.call(expression);
14311431
if(result === true) {
@@ -1566,7 +1566,7 @@ class Parser extends Tapable {
15661566

15671567
walkIdentifier(expression) {
15681568
if(!this.scope.definitions.has(expression.name)) {
1569-
const hook = this.hooks.expression.for(this.scope.renames.get(expression.name) || expression.name);
1569+
const hook = this.hooks.expression.get(this.scope.renames.get(expression.name) || expression.name);
15701570
if(hook !== undefined) {
15711571
const result = hook.call(expression);
15721572
if(result === true)

0 commit comments

Comments
 (0)