Skip to content

Commit 569f8a6

Browse files
committed
Fix doc + use hasOwnProperty
1 parent 7775115 commit 569f8a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/controller.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function $ControllerProvider() {
3030
/**
3131
* @ngdoc method
3232
* @name $controllerProvider#has
33-
* @param (string) name Controller name to check.
33+
* @param {string} name Controller name to check.
3434
*/
3535
this.has = function(name){
36-
return (name && controllers[name])? true : false;
36+
return controllers.hasOwnProperty(name);
3737
};
3838

3939
/**

0 commit comments

Comments
 (0)