Fixed failing .slider("destroy") on empty element. "$(this).data("mouse") is undefined"

This commit is contained in:
Richard Worth 2008-11-12 02:57:04 +00:00
parent e47820f6ea
commit e1fab2ce61

View File

@ -46,7 +46,8 @@ $.widget("ui.slider", {
this.handle
.unwrap("a");
this.handle.each(function() {
$(this).data("mouse")._mouseDestroy();
var mouse = $(this).data("mouse");
mouse && mouse._mouseDestroy();
});
}