Commit 1bf8b124 by Alex Committed by Marijn Haverbeke

Fix: TypeError: Class constructor Node cannot be invoked without 'new'

parent 3eedc6b8
Pipeline #5380425 passed with stage
in 3 minutes 11 seconds
Showing with 1 additions and 1 deletions
......@@ -47,7 +47,7 @@ export default function wrap ( raw, parent ) {
};
}
Node( raw, parent );
new Node( raw, parent );
const type = ( raw.type === 'BlockStatement' ? BlockStatement : types[ raw.type ] ) || Node;
raw.__proto__ = type.prototype;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment