"e.index is not a function" for handles in a directive in 1.3.8
peterjhart opened this issue · comments
ng-sortable throws an error when the as-sortable-item-handle is inside a directive (in my case, with an isolate scope).
The structure is basically:
Parent Template
<div as-sortable="vm.sortableConfig" ng-model="vm.things">
<my-directive ng-repeat="thing in vm.things track by thing.id" as-sortable-item thing="thing"></my-directive as-sortable-item>
</div>
Directive Template
<div as-sortable-item-handle>
{{thing.title}}
</div>
The error (I removed file/lines since it's concatenated):
Uncaught TypeError: e.index is not a function
at Object.dragItem
at _
at HTMLDocument.a
at nt
at HTMLDocument.n
dragItem
_
a
nt
n
When I revert to 1.3.7, this works. When I upgrade to 1.3.8, I get the error.
Google Chrome, AngularJS 1.6.4