babel-preset-extendscript icon indicating copy to clipboard operation
babel-preset-extendscript copied to clipboard

indexOf on string not working

Open marcohamersma opened this issue 7 years ago • 0 comments

Hey hey, Thanks for making this preset, it's a really neat idea. I'm running into an issue with one of the transformations, though, and I'm not sure exactly what to do about it.

I have a couple of instances of string.indexOf('testString') in my code, but after transformation it seems to use a function that's not working with strings, as I'm getting the following error while debugging in Extendscript Toolkit: testString is not an object.

The function that is used instead of the default indexOf: image

Do you know of a way of preventing this error, maybe to ignore this specific transformation or overwriting it?

marcohamersma avatar Oct 01 '18 10:10 marcohamersma