Open basvandenheuvel opened 8 years ago
+1
+1
+1 get this issue now in Angular2 + WebPack config. I'm use this with select2 plugin. mCS version - ^3.1.5 (check https://github.com/malihu/malihu-custom-scrollbar-plugin/issues/392 not help) mCSB_container[0] some times is undefined because mCSBcontainer=$("#mCSB"+d.idx+"_container"); return null.
+1
+1
+1
#392 works
you should add
if(!mCSB_container.length) return;
right after
_autoUpdate=function(rem){
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
mCSB_container=$("#mCSB_"+d.idx+"_container");
I have the same issue . But the pluggin doesn't contain these lines and its version 3.1.5
_autoUpdate=function(rem){ var $this=$(this),d=$this.data(pluginPfx),o=d.opt, mCSB_container=$("#mCSB_"+d.idx+"_container");
I had to uncomment or delete line 1108:
clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout");
I have the same error with lazy load routing of angular, I'v implemented through directive like -
<div class="full-fluid border-bonus bonus-list" malihu-scrollbar [scrollbarOptions]="scrollbarOptions"></div>
Please let me know if anyone have solution.
Version: 3.1.4. Setup: Webpack + Angular 2.
Whenever i try to call
$(element).mCustomScrollbar("destory")
i get an error:Cannot read property 'autoUpdate' of undefined
.