Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    isc.addProperties does not override function properties with string properties

    Hi,

    I have encountered a situation where I need to override a property that has a function value with a property that has a string value generically. I was hoping to use isc.addProperties to do so but it does not seem to function as I would expect it to do so.

    isc.addProperties({}, {test: function(){ return "this is wrong";}}, {test: "this is right"});

    Results in an object that has the function stored at the key "test".

    Could you please provide any advice on an alternative or a possible bug fix?

    We are working with SNAPSHOT_v11.1d_2016-04-15/LGPL Deployment

    Best,
    Mitch

    #2
    Check the logs - you should see a warning about this, as it's a safety measure.

    addProperties() has a few such safety measures and checks centered around it's designed purpose of manipulating objects that are used to config SmartClient instances. If you don't want those measures, implementing your own property copying loop is just a few lines of JavaScript.

    Comment

    Working...
    X