Input Code
function foo()
{
return [...bar].reverse();
};
Actual Output
function foo() {
return [...bar]; // oops - where did reverse() go?
}
Expected Output
function foo() {
return [...bar].reverse();
}
Details
I'd suspect it is reversing the elements in the array literal and removing the reverse() call, but it does not take in to account spread.
Workaround:
function foo()
{
const ret = [...bar];
return ret.reverse();
};
This keeps the reverse() call after minify.
Input Code
Actual Output
Expected Output
Details
I'd suspect it is reversing the elements in the array literal and removing the reverse() call, but it does not take in to account spread.
Workaround:
This keeps the reverse() call after minify.