Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

remove unused #476

Merged
merged 1 commit into from
Jul 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ angular.module('ui.sortable', [])
var savedNodes;

function combineCallbacks(first, second){
var firstIsFunc = first && (typeof first === 'function');
var secondIsFunc = second && (typeof second === 'function');
var firstIsFunc = typeof first === 'function';
var secondIsFunc = typeof second === 'function';
if(firstIsFunc && secondIsFunc) {
return function() {
first.apply(this, arguments);
Expand Down Expand Up @@ -62,12 +62,8 @@ angular.module('ui.sortable', [])
}

// patch the options that need to have values set
if (!value) {
if (key === 'items') {
value = uiSortableConfig.items;
} else if (key === 'ui-model-items') {
value = uiSortableConfig.items;
}
if (!value && (key === 'items' || key === 'ui-model-items')) {
value = uiSortableConfig.items;
}

return value;
Expand Down