Skip to content

Commit fd5c3d6

Browse files
committed
Merge pull request angular-ui#88 from bdecarne/patch-1
check scope.$root.$$phase before $apply
2 parents 67b4d31 + afdb186 commit fd5c3d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
143143
if (!isSelect) {
144144
// Set the view and model value and update the angular template manually for the ajax/multiple select2.
145145
elm.bind("change", function () {
146-
if (scope.$$phase) {
146+
if (scope.$$phase || scope.$root.$$phase) {
147147
return;
148148
}
149149
scope.$apply(function () {

0 commit comments

Comments
 (0)