diff --git a/src/app/ngx-slimscroll/directives/slimscroll.directive.ts b/src/app/ngx-slimscroll/directives/slimscroll.directive.ts index 9db0c4a..f942395 100644 --- a/src/app/ngx-slimscroll/directives/slimscroll.directive.ts +++ b/src/app/ngx-slimscroll/directives/slimscroll.directive.ts @@ -477,6 +477,8 @@ export class SlimScrollDirective implements OnInit, OnChanges, OnDestroy { @HostListener('window:resize', ['$event']) onResize($event: any) { - this.getBarHeight(); + if (this.enabled) { + this.getBarHeight(); + } } }