aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-11-12 02:57:04 +0000
committerRichard Worth <rdworth@gmail.com>2008-11-12 02:57:04 +0000
commite1fab2ce61aca0f3cdd40151a24dc8aba760f4ec (patch)
tree9c714eb9f221d8e4334572149060faecbb534213
parente47820f6ea7810569684464c3a3b02eda5d9604d (diff)
downloadjquery-ui-e1fab2ce61aca0f3cdd40151a24dc8aba760f4ec.tar.gz
jquery-ui-e1fab2ce61aca0f3cdd40151a24dc8aba760f4ec.zip
Fixed failing .slider("destroy") on empty element. "$(this).data("mouse") is undefined"
-rw-r--r--ui/ui.slider.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/ui.slider.js b/ui/ui.slider.js
index 6158ce113..bee87a1ec 100644
--- a/ui/ui.slider.js
+++ b/ui/ui.slider.js
@@ -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();
});
}