Closed jbarrus closed 9 years ago
It looks like there may be a couple attempts to fix this already. I think this should cover the different use cases without errors.
The jquery slider destroy method removes the ui-slider class, so it's pretty easy to just test for that before calling destroy.
_destroy: function() { this.handles.remove(); if ( this.range ) { this.range.remove(); } this.element .removeClass( "ui-slider" + " ui-slider-horizontal" + " ui-slider-vertical" + " ui-widget" + " ui-widget-content" + " ui-corner-all" ); this._mouseDestroy(); },
Other issues/pull requests: https://github.com/angular-ui/ui-slider/issues/41 https://github.com/angular-ui/ui-slider/pull/75
It looks like there may be a couple attempts to fix this already. I think this should cover the different use cases without errors.
The jquery slider destroy method removes the ui-slider class, so it's pretty easy to just test for that before calling destroy.
Other issues/pull requests: https://github.com/angular-ui/ui-slider/issues/41 https://github.com/angular-ui/ui-slider/pull/75