Skip to content

Commit 225a016

Browse files
committed
oops, didn't think that through
1 parent 1853da4 commit 225a016

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

packages/svelte/src/compiler/phases/3-transform/shared/static-evaluation.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,6 @@ export function evaluate_static_expression(node, state, server) {
223223
* let variable = ident_or_evaluable_value;
224224
* return variable;
225225
* });
226-
* // it's fine if we don't want to use this for side effect reasons, its just one line (251)
227-
* (() => {
228-
* anything_but_a_return;
229-
* })()
230226
* ```
231227
* I would like to possibly optimize this:
232228
* ```
@@ -248,7 +244,6 @@ export function evaluate_static_expression(node, state, server) {
248244
let { body } = callee;
249245
if (body.type === 'BlockStatement') {
250246
let children = body.body;
251-
if (!children.find(({ type }) => type === 'ReturnStatement')) return undefined;
252247
if (children.length === 1 && children[0].type === 'ReturnStatement') {
253248
return children[0].argument == null
254249
? undefined

0 commit comments

Comments
 (0)