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.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests