Skip to content

Conversation

tsujiura
Copy link

Fixed a bug that caused an error when deleting all with an application that has the function to delete "sv-part".

angular
    .module('testApp', ['angular-sortable-view'])
    .controller('AppController', function($scope) {
        $scope.lists = [
            [1, 2, 3],
            [4, 5, 6],
            [7, 8, 9]
        ];
        $scope.allDelete = function() {
            $scope.lists = []
        };
    });
<body ng-controller="AppController as app">
    <div sv-root>
        <div ng-repeat="list in lists" sv-part="list">
            <div ng-repeat="card in list" sv-element>
                {{card}}
            </div>
        </div>
        <button ng-click="allDelete()">all delete</button>
    </div>
</body>

The following error occurs when pressing "all delete" button.
TypeError: Cannot read property 'filter' of undefined

@alejandroiglesias
Copy link

@kamilkp this would avoid errors in certain component destroy cases. Can you please merge it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants