-
Expression from animator behaving awkwardly
Hi guys.
I have a layer that calculates an array. It’s final form is something like “[12,11,10,9,8]”. I want to use this in another property with the help of eval(); If I write this in another layer’s sourceText it works as intended.
var arr = eval(thisComp.layer(2).text.sourceText.valueAtTime(0));
arr.includes(Math.floor(time))If I write this in the expression field of an animator it throws an error: “Cannot read property ‘includes’ of undefined”
var arr = eval(thisComp.layer(2).text.sourceText.valueAtTime(0));
arr.includes(textIndex) ? 100 : 0;After I edit the second expression, AE starts to say that even in the first layer there is the same error.
However, even if the expression in the first layer is shown as one that contains an error, it still works, showing true or false depending where I am in the timeline.
If I edit the first expression again, this second error disappears but the animator expression still does not work.
Any suggestion or workaround is well received, thank you.