mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
3d271e82a2
**Description:** This PR fixes the logic for dropping return values of IIFE. **Related issue:** - Closes https://github.com/swc-project/swc/issues/6141.
14 lines
266 B
JavaScript
14 lines
266 B
JavaScript
(function foo(obj) {
|
|
if (obj) {
|
|
for (const key in obj) {
|
|
const element = obj[key];
|
|
|
|
if (element && foo(element.children)) {
|
|
// do something
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
return false;
|
|
})() |