Draggable Ticket 5191 was solved but error remains and documentation not up to date with 1.8

Draggable Ticket 5191 was solved but error remains and documentation not up to date with 1.8

I upgraded to the new 1.8 version. (Thanx for the many improvement!).
When using the draggable plugin you can set the stack option.
According to the documentation you set it like this:

Initialize a draggable with the  stack option specified.
$( ".selector" ).draggable( { stack: { group: 'products', min: 50 } } );

However when looking at the source there has been a change between 1.7.2 and 1.8.

in 1.7.2 the source is:
  1. $.ui.plugin.add("draggable", "stack", {
  2. start: function(event, ui) {

  3. var o = $(this).data("draggable").options;

  4. var group = $.makeArray($(o.stack.group)).sort(function(a,b) {
  5. return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min);
  6. });

  7. $(group).each(function(i) {
  8. this.style.zIndex = o.stack.min + i;
  9. });

  10. this[0].style.zIndex = o.stack.min + group.length;

  11. }
  12. });


in 1.8 it is:

  1.     $.ui.plugin.add("draggable", "stack", {
  2.         start: function(event, ui) {

  3.             var o = $(this).data("draggable").options;

  4.             var group = $.makeArray($(o.stack)).sort(function(a, b) {
  5.                 return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
  6.             });
  7.             if (!group.length) { return; }


  8.             var min = parseInt(group[0].style.zIndex) || 0;
  9.             $(group).each(function(i) {
  10.                 this.style.zIndex = min + i;
  11.             });

  12.             this[0].style.zIndex = min + group.length;

  13.         }
  14.     });


As you can see from the highlighted lines the change was from  "o.stack.group" to "o.stack"

This caused this line in the 1.8 version to fail.
  1. var min = parseInt(group[0].style.zIndex) || 0;
an error like ' Cannot read property 'zIndex' of undefined' will result.

this was already noticed before and documented in ticket:

however this fix not works and the error remains the same when using stack as documented which is strange as you would expect group.length to be zero.

i changed my source using the draggable from "stack: {group: '.windows', min: 50}" to "stack: '.windows' to fix the problem.