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

Commit 99e8e81

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ng/directive/ngModel.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ 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+
//TODO: remove this or do not merge into 1.7
287+
Object.defineProperty(this, '$$scope', {value: $scope});
285288
this.$$attr = $attr;
286289
this.$$element = $element;
287290
this.$$animate = $animate;

0 commit comments

Comments
 (0)