Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit f5eb920

Browse files
committed
fix(ngModel): prevent internal scope reference from being copied
Fixes #15833
1 parent f4d0bb6 commit f5eb920

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ng/directive/ngModel.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $
281281

282282
this.$$currentValidationRunId = 0;
283283

284-
this.$$scope = $scope;
284+
//https://github.com/angular/angular.js/issues/15833
285+
//Prevent `$$scope` from being iterated over by `copy` when NgModelController is deep watched
286+
Object.defineProperty(this, '$$scope', {value: $scope});
285287
this.$$attr = $attr;
286288
this.$$element = $element;
287289
this.$$animate = $animate;

0 commit comments

Comments
 (0)