Skip to content

Commit

Permalink
* callArgs -> args
Browse files Browse the repository at this point in the history
  • Loading branch information
RubaXa committed Sep 22, 2015
1 parent 4524cd8 commit 16bf388
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jquery.binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
* @returns {jQuery|*}
*/
$.fn.sortable = function (options) {
var retVal;
var callArgs = arguments;
var retVal,
args = arguments;

this.each(function () {
var $el = $(this),
sortable = $el.data('sortable');
Expand All @@ -47,14 +48,14 @@
$el.removeData('sortable');
}
else if (typeof sortable[options] === 'function') {
retVal = sortable[options].apply(sortable, [].slice.call(callArgs, 1));
retVal = sortable[options].apply(sortable, [].slice.call(args, 1));
}
else if (options in sortable.options) {
retVal = sortable.option.apply(sortable, callArgs);
retVal = sortable.option.apply(sortable, args);
}
}
});

return (retVal === void 0) ? this : retVal;
};
});
});

0 comments on commit 16bf388

Please sign in to comment.