Skip to content

Commit

Permalink
Discard changes to crates/swc_ecma_minifier/tests/fixture/issues/9030…
Browse files Browse the repository at this point in the history
…/input.js
  • Loading branch information
kdy1 authored Jun 12, 2024
1 parent 504b543 commit 7e13d0e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/9030/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var FRUITS = { MANGO: "mango" };

var getMangoLabel = (label) => label[FRUITS.MANGO];

export default (name) => {
// Breaks with switch case
switch (name) {
case FRUITS.MANGO: {
return getMangoLabel
}
}
// Works with if else
// if (name === FRUITS.MANGO) {
// return getMangoLabel;
// }
};

0 comments on commit 7e13d0e

Please sign in to comment.