Fix withDefaultValue

This commit is contained in:
Brent Vatne
2018-06-20 13:37:33 -07:00
parent 6cba8d7dca
commit b25d36827c

View File

@@ -1,5 +1,5 @@
export default (obj, key, defaultValue) => {
if (obj.hasOwnProperty(key)) {
if (obj.hasOwnProperty(key) && typeof obj[key] !== 'undefined') {
return obj;
}