ui.sortable.js - 1.6rc2 - Missing Logic in: toArray

ui.sortable.js - 1.6rc2 - Missing Logic in: toArray


While implementing sortable lists I encountered errors when calling
'toArray'. These errors were not experienced when calling the
comparable functionality 'serialize' and I noticed a difference in the
object testing logic. Below is my correction to the logic to have the
same object testing for both 'toArray' and 'serialize' and it has
corrected the errors I experienced.
    toArray: function(o) {
        var items = this._getItemsAsjQuery(o && o.connected);
        var ret = []; o = o || {};
        items.each(function() { ret.push($(this.item ||
this).attr(o.attribute || 'id') || ''); });
        return ret;
    },