You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
I occasionally get this error. The culprit appears to be the following:
// When we add or remove elements, we need the sortable to 'refresh'
// so it can find the new/removed elements.
scope.$watch(attrs.ngModel+'.length', function() {
// Timeout to let ng-repeat modify the DOM
$timeout(function() {
// ensure that the jquery-ui-sortable widget instance
// is still bound to the directive's element
if (!!element.data('ui-sortable')) {
element.sortable('refresh');
}
}, 0, false);
});
Specifically, the check if (!!element.data('ui-sortable')) seems to be incorrect.
The check to see if the sortable instance is initialized normally returns a jQuery $.widget object, but in the cases where I get this error, it is just returning the string sortableOptions so it appears the check is occurring prior to the Angular compilation but still resulting in true because a string value is truthy. Of course, refresh cannot be called on an uninitialized sortable leading to this exception.