nytimes / react-tracking

🎯 Declarative tracking for React apps.
https://open.nytimes.com/introducing-react-tracking-declarative-tracking-for-react-apps-2c76706bb79a
Other
1.88k stars 123 forks source link

Return promise for decorator on async method #147

Closed rickh18 closed 4 years ago

rickh18 commented 4 years ago

After updating from 5.3.0 my application broke on a method that was returned a promise. It turned out that the instead of the promise, undefined was returned by the method, comparable to the behaviour described in issue #106.

This has been fixed by adding return fn in trackEventMethodDecorator. The unit test now has an extra check to see if the original method still works.

tizmagik commented 4 years ago

Released as v7.3.0 -- thank you! 🎉