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

Commit 54b3875

Browse files
committed
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
1 parent 008a782 commit 54b3875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ function $CompileProvider($provide) {
474474

475475
// use class as directive
476476
className = node.className;
477-
if (isString(className)) {
477+
if (isString(className) && className !== '') {
478478
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
479479
nName = directiveNormalize(match[2]);
480480
if (addDirective(directives, nName, 'C', maxPriority)) {

0 commit comments

Comments
 (0)