Skip to content

Commit

Permalink
Merge pull request #110 from yurks/patch-1
Browse files Browse the repository at this point in the history
ng-model should be an array
  • Loading branch information
JimLiu committed Apr 21, 2014
2 parents f4ff171 + 13107ce commit 20b2afa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/directives/uiTreeNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

if (ngModel) {
ngModel.$render = function() {
if (!ngModel.$modelValue || !angular.isArray(ngModel.$modelValue)) {
ngModel.$setViewValue([]);
}
scope.$modelValue = ngModel.$modelValue;
};
}
Expand Down

0 comments on commit 20b2afa

Please sign in to comment.