Open
Description
I need to set field value programatically, but sometimes the value is null or undefined.
// example
const name = field('name', '');
name.set(null);
If I call set method with null parameter it causes this error:
TypeError: Cannot convert undefined or null to object
It is caused by const keys = Object.keys(field);
in function isField .
Is it feature or bug?
I can work around it with this:
const fieldObj = get(name);
fieldObject.value = null;
name.set(fieldObj);
But it seems unnecessarily complicated.