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

Commit cfc4a23

Browse files
committed
Merge remote-tracking branch 'remotes/angular-ui/master'
2 parents 37c33d8 + 4bb4493 commit cfc4a23

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: src/sortable.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ angular.module('ui.sortable', [])
2323
var savedNodes;
2424

2525
function combineCallbacks(first, second){
26-
var firstIsFunc = first && (typeof first === 'function');
27-
var secondIsFunc = second && (typeof second === 'function');
26+
var firstIsFunc = typeof first === 'function';
27+
var secondIsFunc = typeof second === 'function';
2828
if(firstIsFunc && secondIsFunc) {
2929
return function() {
3030
first.apply(this, arguments);
@@ -62,12 +62,8 @@ angular.module('ui.sortable', [])
6262
}
6363

6464
// patch the options that need to have values set
65-
if (!value) {
66-
if (key === 'items') {
67-
value = uiSortableConfig.items;
68-
} else if (key === 'ui-model-items') {
69-
value = uiSortableConfig.items;
70-
}
65+
if (!value && (key === 'items' || key === 'ui-model-items')) {
66+
value = uiSortableConfig.items;
7167
}
7268

7369
return value;

0 commit comments

Comments
 (0)