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

Commit 0c399bc

Browse files
committed
chore($compile): remove bogus scope/controller check
We already have the same test in $controller which is called just a few lines above Closes #3517
1 parent a207665 commit 0c399bc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/ng/compile.js

-5
Original file line numberDiff line numberDiff line change
@@ -1035,11 +1035,6 @@ function $CompileProvider($provide) {
10351035
'$' + directive.name + 'Controller',
10361036
controllerInstance);
10371037
if (directive.controllerAs) {
1038-
if (typeof locals.$scope !== 'object') {
1039-
throw new Error('Can not export controller as "' + directive.controllerAs + '". ' +
1040-
'No scope object provided!');
1041-
}
1042-
10431038
locals.$scope[directive.controllerAs] = controllerInstance;
10441039
}
10451040
});

0 commit comments

Comments
 (0)