Skip to content
Permalink
Browse files

Draggable: Don't try to stack if there are no elements in the stackin…

…g group.

Fixes #5191 - Draggable: stack option can throw error.
  • Loading branch information
scottgonzalez committed Feb 18, 2010
1 parent 6d7196f commit 74120e0df18669c0e00393ace867a6ef0c468d8f
Showing with 1 addition and 0 deletions.
  1. +1 −0 ui/jquery.ui.draggable.js
@@ -770,6 +770,7 @@ $.ui.plugin.add("draggable", "stack", {
var group = $.makeArray($(o.stack)).sort(function(a,b) {
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
});
if (!group.length) { return; }

var min = parseInt(group[0].style.zIndex) || 0;
$(group).each(function(i) {

0 comments on commit 74120e0

Please sign in to comment.
You can’t perform that action at this time.