Skip to content

Commit 8d0b4cb

Browse files
committed
exit early
1 parent a2c1c93 commit 8d0b4cb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/coerce.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,7 @@ exports.coerce = function(containerIn, containerOut, attributes, attribute, dflt
408408
* returns false if there is no user input.
409409
*/
410410
exports.coerce2 = function(containerIn, containerOut, attributes, attribute, dflt) {
411-
var propIn = nestedProperty(containerIn, attribute);
412411
var propOut = exports.coerce(containerIn, containerOut, attributes, attribute, dflt);
413-
var valIn = propIn.get();
414412

415413
var attr = attributes[attribute];
416414
var theDefault = (dflt !== undefined) ? dflt : (attr || {}).dflt;
@@ -421,6 +419,7 @@ exports.coerce2 = function(containerIn, containerOut, attributes, attribute, dfl
421419
return propOut;
422420
}
423421

422+
var valIn = nestedProperty(containerIn, attribute).get();
424423
return (valIn !== undefined && valIn !== null) ? propOut : false;
425424
};
426425

0 commit comments

Comments
 (0)