KingSora / OverlayScrollbars

A javascript scrollbar plugin that hides the native scrollbars, provides custom styleable overlay scrollbars, and preserves the native functionality and feel.
https://kingsora.github.io/OverlayScrollbars
MIT License
3.9k stars 215 forks source link

Jest: Cannot read properties of null (reading 'destroy') #670

Closed de-don closed 3 months ago

de-don commented 3 months ago

This code fails in jest tests because of !. Instance not initialized yet, but angular tries to destory component, and this is raises and error

https://github.com/KingSora/OverlayScrollbars/blob/b11536b47b3a67b5a3d169c7fc3a98fda1602acd/packages/overlayscrollbars-ngx/src/overlayscrollbars.component.ts#L100

de-don commented 3 months ago

Fix in pull request https://github.com/KingSora/OverlayScrollbars/pull/671

KingSora commented 3 months ago

@de-don I've merged your PR and will release a new version with the fix soon

de-don commented 3 months ago

@KingSora Hi, could you please tell me, when new version will be released?

thanks :)

KingSora commented 3 months ago

@de-don I've just published overlayscrollbars-ngx v0.5.2 :)

de-don commented 3 months ago

It solved the problem, thank you!