From 78500111dad388089ea37aca75d4c5bb43f79625 Mon Sep 17 00:00:00 2001 From: Dave Stein Date: Sun, 24 Feb 2013 18:56:02 -0500 Subject: [PATCH] Draggable: `_isValidTarget` returning boolean --- ui/jquery.ui.draggable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 904cc51dc..e10101768 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -77,7 +77,8 @@ $.widget( "ui.draggable", $.ui.interaction, { var handle = this.options.handle ? element.closest( this.options.handle ).length : true, exclude = this.options.exclude ? element.closest( this.options.exclude ).length : false; - return ( handle && !exclude ); + // Enforce boolean + return !!( handle && !exclude ); }, _start: function( event, pointerPosition ) {