``Config.Set()`` is Not Override New Value if Value is Not The Same Type
KiddoV opened this issue · comments
The config.Set()
should override the value even though the old value is not the same type of the new one.
EX:
{
"parent": {
"child": "Test Var"
}
}
After config.Set("parent.child.grandChild", "New Val")
the object should be:
{
"parent": {
"child": {
"grandChild": "New Val"
}
}
}
As for now, it does not change anything or not even throw any error. I think it is because parent.child
value was a string
so it doesn't allow me to add a new struct
({grandChild: "New Val"}) to it.
Any idea how to fix it?
I enhanced the Set
logic:
Allow you change set parent.child
value to {grandChild: "New Val"}
.
But, Set("parent.child.grandChild", "New Val")
is not allowed.
Better than nothing! Thanks!