mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-14 08:53:21 +08: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:
@@ -474,7 +474,7 @@ function $CompileProvider($provide) {
|
||||
|
||||
// use class as directive
|
||||
className = node.className;
|
||||
if (isString(className)) {
|
||||
if (isString(className) && className !== '') {
|
||||
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
|
||||
nName = directiveNormalize(match[2]);
|
||||
if (addDirective(directives, nName, 'C', maxPriority)) {
|
||||
|
||||
Reference in New Issue
Block a user