You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function test() {
var m = this.transform; // Get the line scale.
// Determinant of `m` means how much the area is enlarged by the
// transformation. So its square root can be used as a scale factor
// for width.
return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10 ? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1])) : 1;
}
After compression
function test(){var m=this.transform;return m&&abs(m[0]-1)>.e-9&&abs(m[3]-1)>.e-9?Math.sqrt(abs(m[0]*m[3]-m[2]*m[1])):1}
The text was updated successfully, but these errors were encountered:
That is an embarrassing bug that has been in there for a long time. The test can be compressed to 1e-10 which invalidly in minified to .e-9. I will fix this ASAP, thank you for the report!
To be clear, this bug only applied to the specific number 1e-10 but also to 1e-100, 1e-1000 etc., any other numbers such as 1e-9 and 1e-11 were fine. There is also a test that generates random numbers (10.000 for every commit), minifies them, and checks whether the same number is outputted, but by chance it hasn't been able to detect this bug so far. Bad luck! But embarrassing nonetheless.
chrome console error
After compress Error code
I use nodejs uglifyjs, which has no errors
I found the source code and tested compression
After compression
The text was updated successfully, but these errors were encountered: