@@ -525,17 +525,18 @@ CompilerProto.compileElement = function (node, root) {
525
525
var prefix = config . prefix + '-' ,
526
526
attrs = slice . call ( node . attributes ) ,
527
527
params = this . options . paramAttributes ,
528
- attr , isDirective , exp , directives , directive , dirname
528
+ attr , attrname , isDirective , exp , directives , directive , dirname
529
529
530
530
for ( i = 0 , l = attrs . length ; i < l ; i ++ ) {
531
531
532
532
attr = attrs [ i ]
533
+ attrname = attr . name
533
534
isDirective = false
534
535
535
- if ( attr . name . indexOf ( prefix ) === 0 ) {
536
+ if ( attrname . indexOf ( prefix ) === 0 ) {
536
537
// a directive - split, parse and bind it.
537
538
isDirective = true
538
- dirname = attr . name . slice ( prefix . length )
539
+ dirname = attrname . slice ( prefix . length )
539
540
// build with multiple: true
540
541
directives = this . parseDirective ( dirname , attr . value , node , true )
541
542
// loop through clauses (separated by ",")
@@ -553,8 +554,8 @@ CompilerProto.compileElement = function (node, root) {
553
554
exp = TextParser . parseAttr ( attr . value )
554
555
if ( exp ) {
555
556
directive = this . parseDirective ( 'attr' , exp , node )
556
- directive . arg = attr . name
557
- if ( params && params . indexOf ( attr . name ) > - 1 ) {
557
+ directive . arg = attrname
558
+ if ( params && params . indexOf ( attrname ) > - 1 ) {
558
559
// a param attribute... we should use the parent binding
559
560
// to avoid circular updates like size={{size}}
560
561
this . bindDirective ( directive , this . parent )
@@ -565,7 +566,7 @@ CompilerProto.compileElement = function (node, root) {
565
566
}
566
567
567
568
if ( isDirective && dirname !== 'cloak' ) {
568
- node . removeAttribute ( attr . name )
569
+ node . removeAttribute ( attrname )
569
570
}
570
571
}
571
572
0 commit comments