swc/crates/swc_webpack_ast/tests/fixture/try-catch/1/input.js

19 lines
465 B
JavaScript
Raw Normal View History

export function foo (){
try {
const meta = this.meta();
// const { event, team, user } = this.props;
const b = team ? event.user : user;
if (meta && meta.p1) {
return meta.p1;
} else if (meta && meta.p2) {
return meta.p2;
} else if (meta && meta.p3) {
return meta.p3;
}
return b.p4 === u.u ? 'You' : b.u;
} catch (e) {
return 'You';
}
}