Skip to content

Commit

Permalink
Do not include unused return expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Jul 15, 2022
1 parent 1d74b6f commit bfd339f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/ast/nodes/CallExpression.ts
Expand Up @@ -99,10 +99,6 @@ export default class CallExpression extends CallExpressionBase implements Deopti
this.callee.include(context, false);
}
this.callee.includeCallArguments(context, this.arguments);
const returnExpression = this.getReturnExpression();
if (!returnExpression.included) {
returnExpression.include(context, false);
}
}

render(
Expand Down
1 change: 0 additions & 1 deletion test/form/samples/return-after-error/_config.js
@@ -1,6 +1,5 @@
const path = require('path');

module.exports = {
solo: true,
description: 'tree-shakes entities referenced in a return statement after an error'
};

0 comments on commit bfd339f

Please sign in to comment.