Minify obfuscates array.includes()

For developers using the Construct 2 Javascript SDK

Post » Sun Sep 24, 2017 7:23 pm

I can't submit this as a bug report because it's to do with the SDK and the closure compiler minfier. So, to all you javascript devs, just be aware that if you use the array.includes(x) method then it will become corrupted by the minifier (r246). Of course, you can work around using array["includes"](x).

Just for info in case anyone else gets caught out by this (that's an hour of my life I shalln't get back)! :)
A big fan of JavaScript. Image Image
Posts: 2,347
Reputation: 50,188

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 2 guests