swc/crates/swc_ecma_minifier/tests/fixture/issues/6141/output.js
Donny/강동윤 3d271e82a2
fix(es/minifier): Preserve return values of recursive IIFE (#6142)
**Description:**

This PR fixes the logic for dropping return values of IIFE.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6141.
2022-10-14 09:32:56 +09:00

11 lines
206 B
JavaScript

!function foo(obj) {
if (obj) {
for(const key in obj){
const element = obj[key];
element && foo(element.children);
}
return !0;
}
return !1;
}();