Came across this problem while trying to optimize a script that requires vue-router@3.0.1. It looks like this line is the culprit:
|
if (bodyNode.consequent && bodyNode.consequent.body) { |
I've fixed it locally by adding && bodyNode.consequent.body.length to the end of the if statement linked because consequent.body is an object not an array in this case ({type: 'BlockStatement', body: {...}}).