config icon indicating copy to clipboard operation
config copied to clipboard

``Config.Set()`` is Not Override New Value if Value is Not The Same Type

Open KiddoV opened this issue 3 years ago • 0 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?

KiddoV avatar Apr 29 '22 13:04 KiddoV