get() from undefined should return default value
radmen opened this issue · comments
Radosław Mejer commented
I think that it would be a good case when dotProp.get()
returns defualt value even when given object is not an instance of Object
.
Quick example:
var fields = undefined;
dotProp.get(fields, 'attributes.required', false);
// false
Right now it returns the passed object.
Sindre Sorhus commented
Agreed. Pull request welcome :)