Bug Report: Auto minify for JS breaks scripts with the [Number] .toString() syntax

This is a bug report with the Auto Minify Feature with JS. Issue was originally found with Webflow’s exported script: webflow.js.

Issue
The Auto-minify feature will automatically remove the space in the following syntax “[Number] .toString()”, for example “1 .toString()”. Unfortunately this is a valid syntax in javascript, which converts the Number into a string. Trying to call .toString() directly on the number causes a syntax error (eg. 1.toString() )

To Replicate
create any javascript with something like “const n = 5 .toString()”.
Non-minified it will run fine
Once cached and auto minified, it will cause a syntax error due to the stripped space.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.