Replies: 1 comment 2 replies
-
I think it's a regression and it's a bug. Are you using swc minifier? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Building poppperjs library (particularly this code https://github.com/floating-ui/floating-ui/blob/master/packages/dom/src/platform/getClippingRect.ts) with SWC 1.3.83 (left) and 1.3.101 (right)
On the left,
a
is first initialized, then reduced.On the right,
a
is initialized inside the accumulator ofa.reduce
, which causes "Cannot read properties of undefined (reading 'reduce')"I'm not entirely sure that it's caused by the SWC, but the code does change if I rollback to 83. Cannot yet create a minimal reproducible repo but seems serious enough to raise this question.
I'm going to catch some sleep to make sure I'm in a sane state, but looks like the code on the left cannot ever be run successfully, as
a
is not defined, and whilereduce
is called beforea
initialized in argument, it cannot work that way?Beta Was this translation helpful? Give feedback.
All reactions