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)! :)
Learning other engines, but C2 still rocks. Image Image Image Image
Posts: 2,417
Reputation: 57,671

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests