@@ -364,11 +364,11 @@ exports.coerce = function(containerIn, containerOut, attributes, attribute, dflt
364
364
var opts = nestedProperty ( attributes , attribute ) . get ( ) ;
365
365
var propIn = nestedProperty ( containerIn , attribute ) ;
366
366
var propOut = nestedProperty ( containerOut , attribute ) ;
367
- var v = propIn . get ( ) ;
367
+ var valIn = propIn . get ( ) ;
368
368
369
369
var template = containerOut . _template ;
370
- if ( v === undefined && template ) {
371
- v = nestedProperty ( template , attribute ) . get ( ) ;
370
+ if ( valIn === undefined && template ) {
371
+ valIn = nestedProperty ( template , attribute ) . get ( ) ;
372
372
// already used the template value, so short-circuit the second check
373
373
template = 0 ;
374
374
}
@@ -381,20 +381,20 @@ exports.coerce = function(containerIn, containerOut, attributes, attribute, dflt
381
381
* individual form (eg. some array vals can be numbers, even if the
382
382
* single values must be color strings)
383
383
*/
384
- if ( opts . arrayOk && isArrayOrTypedArray ( v ) ) {
385
- propOut . set ( v ) ;
386
- return v ;
384
+ if ( opts . arrayOk && isArrayOrTypedArray ( valIn ) ) {
385
+ propOut . set ( valIn ) ;
386
+ return valIn ;
387
387
}
388
388
389
389
var coerceFunction = exports . valObjectMeta [ opts . valType ] . coerceFunction ;
390
- coerceFunction ( v , propOut , dflt , opts ) ;
390
+ coerceFunction ( valIn , propOut , dflt , opts ) ;
391
391
392
392
var out = propOut . get ( ) ;
393
393
// in case v was provided but invalid, try the template again so it still
394
394
// overrides the regular default
395
- if ( template && out === dflt && ! validate ( v , opts ) ) {
396
- v = nestedProperty ( template , attribute ) . get ( ) ;
397
- coerceFunction ( v , propOut , dflt , opts ) ;
395
+ if ( template && out === dflt && ! validate ( valIn , opts ) ) {
396
+ valIn = nestedProperty ( template , attribute ) . get ( ) ;
397
+ coerceFunction ( valIn , propOut , dflt , opts ) ;
398
398
out = propOut . get ( ) ;
399
399
}
400
400
return out ;
0 commit comments