@@ -365,8 +365,8 @@ exports.coerce = function(containerIn, containerOut, attributes, attribute, dflt
365
365
} ;
366
366
367
367
function _coerce ( containerIn , containerOut , attributes , attribute , dflt ) {
368
- var opts = nestedProperty ( attributes , attribute ) . get ( ) ;
369
- if ( dflt === undefined ) dflt = opts . dflt ;
368
+ var attr = nestedProperty ( attributes , attribute ) . get ( ) ;
369
+ if ( dflt === undefined ) dflt = attr . dflt ;
370
370
var src = '' ; // i.e. default
371
371
372
372
var propIn = nestedProperty ( containerIn , attribute ) ;
@@ -388,7 +388,7 @@ function _coerce(containerIn, containerOut, attributes, attribute, dflt) {
388
388
* individual form (eg. some array vals can be numbers, even if the
389
389
* single values must be color strings)
390
390
*/
391
- if ( opts . arrayOk && isArrayOrTypedArray ( valIn ) ) {
391
+ if ( attr . arrayOk && isArrayOrTypedArray ( valIn ) ) {
392
392
propOut . set ( valIn ) ;
393
393
return {
394
394
inp : valIn ,
@@ -397,17 +397,17 @@ function _coerce(containerIn, containerOut, attributes, attribute, dflt) {
397
397
} ;
398
398
}
399
399
400
- var coerceFunction = exports . valObjectMeta [ opts . valType ] . coerceFunction ;
401
- coerceFunction ( valIn , propOut , dflt , opts ) ;
400
+ var coerceFunction = exports . valObjectMeta [ attr . valType ] . coerceFunction ;
401
+ coerceFunction ( valIn , propOut , dflt , attr ) ;
402
402
403
403
var valOut = propOut . get ( ) ;
404
404
if ( valOut !== undefined ) src = 'c' ; // container
405
405
406
406
// in case v was provided but invalid, try the template again so it still
407
407
// overrides the regular default
408
- if ( template && valOut === dflt && ! validate ( valIn , opts ) ) {
408
+ if ( template && valOut === dflt && ! validate ( valIn , attr ) ) {
409
409
valIn = nestedProperty ( template , attribute ) . get ( ) ;
410
- coerceFunction ( valIn , propOut , dflt , opts ) ;
410
+ coerceFunction ( valIn , propOut , dflt , attr ) ;
411
411
valOut = propOut . get ( ) ;
412
412
413
413
if ( valOut !== undefined ) src = 't' ; // template
0 commit comments