Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

eventInfo.previousValue should be undefined when an empty text field is changed for the first time

I have seen this topic a few times on locked posts from months ago but I haven't seen a solution. It seems that eventInfo.previousValue returns what the field has been set to(eventInfo.newValue) when the user enters data into the field for the first time. Even putting a default value in the field does not stop this behavior. Thanks
1586160953
GiGs
Pro
Sheet Author
API Scripter
This has been tripping me up over the weekend too.
The only good thing is that as far as I can tell eventInfo.newValue == eventInfo.previousValue can only be true in this one case, since not changing the feild wont trigger the event. so you can say if(prev == new){prev = undefined} and that worked for me