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

Commit 9ef4622

Browse files
committed
refactor(sortable): change getElementScope to increase code coverage
1 parent c023e32 commit 9ef4622

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sortable.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ angular.module('ui.sortable', [])
4848
}
4949

5050
function getElementScope(elementScopes, element) {
51+
var result = null;
5152
for (var i = 0; i < elementScopes.length; i++) {
5253
var x = elementScopes[i];
5354
if (x.element[0] === element[0]) {
54-
return x.scope;
55+
result = x.scope;
56+
break;
5557
}
5658
}
57-
return null;
59+
return result;
5860
}
5961

6062
function afterStop(e, ui) {

0 commit comments

Comments
 (0)