iDad5 Posted March 12, 2022 Share Posted March 12, 2022 It might not be the right place to address this, but as I know the galactic folks of greensock are reading this I try my luck. Just stumbled on a thing in the documentation of ScrollTrigger.getById(). I wanted to know what the method returns if no ScrollTrigger with the ID is present. It's easy to check but I would be very happy to find a description like "it returns a ScrollTrigger instance or undefined...". I will check for undefined now, but it feels somewhat hacky to me - if you decide to change it to null at some point... If I'm not asking too much, I would like you to consider documenting the retune type of methods for cases where nothing is returned - and beeing even more audacious I'd say that I personally would prefer null over undefined... Link to comment Share on other sites More sharing options...
Solution GreenSock Posted March 12, 2022 Solution Share Posted March 12, 2022 Thanks for the suggestion. I added a note there. I'd rather not add the extra code to make it return null instead of undefined (not worth the extra kb). 2 Link to comment Share on other sites More sharing options...
iDad5 Posted March 12, 2022 Author Share Posted March 12, 2022 Thanks for the exceptionally quick response as always. Undefined is fine, feels just good to have it documented. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now