mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-10 15:54:42 +00:00
fix($compile): don't look for class directives in empty string
if className is undefined or empty string, don't bother looking for directives in there
This commit is contained in:
parent
9bff5c60df
commit
adfb75e3c6
1 changed files with 1 additions and 1 deletions
|
|
@ -474,7 +474,7 @@ function $CompileProvider($provide) {
|
||||||
|
|
||||||
// use class as directive
|
// use class as directive
|
||||||
className = node.className;
|
className = node.className;
|
||||||
if (isString(className)) {
|
if (isString(className) && className !== '') {
|
||||||
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
|
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
|
||||||
nName = directiveNormalize(match[2]);
|
nName = directiveNormalize(match[2]);
|
||||||
if (addDirective(directives, nName, 'C', maxPriority)) {
|
if (addDirective(directives, nName, 'C', maxPriority)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue