Closed davidstellini closed 4 years ago
I'm getting this error: vendor.js:formatted:17974 ERROR TypeError: Cannot read property 'call' of undefined
I tried it on both Smoovy 0.16, as well as 0.2.0.
One way to replicate it seems to be switching between responsive modes in chrome.
This line in emitter.ts seems to be causing the problem. https://github.com/davideperozzi/smoovy/blob/c0a6e39ae7f7ef7ab1ad0955ade8db1a76fbc54d/packages/event/src/emitter.ts#L59
Even though listeners['recalc'].length is 1, it's trying to call the second callback [1].
I'm also getting: vendor.js:formatted:17974 ERROR TypeError: Cannot read property 'recalc' of undefined
vendor.js:formatted:17974 ERROR TypeError: Cannot read property 'recalc' of undefined
I'm not doing anything special, just using smoovy as follows:
this.scroller = nativeSmoothScroll( fromElement.nativeElement, { lerp: { damping: .1 }, native: { condition: () => window.innerWidth <= 768 } } );
If you know what the issue might be and point me in the right direction, it would be great, otherwise I can try to make a stackblitz or open an MR :)
Thank you for opening the issue! Should be fixed in version @smoovy/scroller@0.2.1 :)
@smoovy/scroller@0.2.1
Worked! Thanks :)
I'm getting this error: vendor.js:formatted:17974 ERROR TypeError: Cannot read property 'call' of undefined
I tried it on both Smoovy 0.16, as well as 0.2.0.
One way to replicate it seems to be switching between responsive modes in chrome.![image](https://user-images.githubusercontent.com/4324419/83847214-8a517480-a714-11ea-9391-5cc672254ef4.png)
This line in emitter.ts seems to be causing the problem. https://github.com/davideperozzi/smoovy/blob/c0a6e39ae7f7ef7ab1ad0955ade8db1a76fbc54d/packages/event/src/emitter.ts#L59
Even though listeners['recalc'].length is 1, it's trying to call the second callback [1].
I'm also getting:
vendor.js:formatted:17974 ERROR TypeError: Cannot read property 'recalc' of undefined
I'm not doing anything special, just using smoovy as follows:
If you know what the issue might be and point me in the right direction, it would be great, otherwise I can try to make a stackblitz or open an MR :)