mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Fixed failing .slider("destroy") on empty element. "$(this).data("mouse") is undefined"
This commit is contained in:
parent
e47820f6ea
commit
e1fab2ce61
@ -46,7 +46,8 @@ $.widget("ui.slider", {
|
|||||||
this.handle
|
this.handle
|
||||||
.unwrap("a");
|
.unwrap("a");
|
||||||
this.handle.each(function() {
|
this.handle.each(function() {
|
||||||
$(this).data("mouse")._mouseDestroy();
|
var mouse = $(this).data("mouse");
|
||||||
|
mouse && mouse._mouseDestroy();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user