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:
Igor Minar 2012-10-25 01:00:21 -07:00
parent 008a782bc8
commit 54b3875ba5

View file

@ -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)) {