From adfb75e3c6cb5765e94c915f50008fa9799befd1 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 25 Oct 2012 01:00:21 -0700 Subject: 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 --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ng/compile.js') diff --git a/src/ng/compile.js b/src/ng/compile.js index fd431849..9ed7f107 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -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)) { -- cgit v1.2.3