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

Commit 5f673da

Browse files
committed
changing getDirectiveRestrict signature
1 parent c985d11 commit 5f673da

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ng/compile.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -969,15 +969,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
969969
return require;
970970
}
971971

972-
function getDirectiveRestrict(directive, name) {
973-
if (directive.restrict != null && !(isString(directive.restrict) && /[EACM]/.test(directive.restrict))) {
972+
function getDirectiveRestrict(restrict, name) {
973+
if (restrict != null && !(isString(restrict) && /[EACM]/.test(restrict))) {
974974
throw $compileMinErr('badrestrict',
975975
"Restrict property '{0}' of directive '{1}' is invalid",
976-
directive.restrict,
976+
restrict,
977977
name);
978978
}
979979

980-
return directive.restrict || 'EA';
980+
return restrict || 'EA';
981981
}
982982

983983
/**
@@ -1018,7 +1018,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
10181018
directive.index = index;
10191019
directive.name = directive.name || name;
10201020
directive.require = getDirectiveRequire(directive);
1021-
directive.restrict = getDirectiveRestrict(directive, name);
1021+
directive.restrict = getDirectiveRestrict(directive.restrict, name);
10221022
directive.$$moduleName = directiveFactory.$$moduleName;
10231023
directives.push(directive);
10241024
} catch (e) {

0 commit comments

Comments
 (0)