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

Commit e7439e5

Browse files
committed
refactor(sortable): replace for-in-hasOwnProperty with angular.forEach
This also brings code coverage back to 100%.
1 parent 3c7d0f0 commit e7439e5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/sortable.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,9 @@ angular.module('ui.sortable', [])
8484
_isCanceled: false,
8585
_isCustomHelperUsed: ui.item.sortable._isCustomHelperUsed,
8686
_destroy: function () {
87-
for (var key in ui.item.sortable) {
88-
if (ui.item.sortable.hasOwnProperty(key)) {
89-
ui.item.sortable[key] = undefined;
90-
}
91-
}
87+
angular.forEach(ui.item.sortable, function(value, key) {
88+
ui.item.sortable[key] = undefined;
89+
});
9290
}
9391
};
9492
};

0 commit comments

Comments
 (0)