5

I am testing super basic component and getting this extremely bizzare behaviour:

<aura:component >
    <aura:attribute type="String[]" name="mystate" access="global"/>
    <ui:button press="{!c.check}" label="check" />
</aura:component>

check : function(component, event, helper) {
    component.set("v.mystate", ['foo'])
    let state = component.get("v.mystate")
    console.log( state )
}

Console log prints enter image description here

Using simple string attribute is fine.

5

This is a normal behaviour - LS in V40 uses native Proxy object.

https://developer.salesforce.com/docs/atlas.en-us.208.0.lightning.meta/lightning/security_proxy.htm

https://developer.salesforce.com/docs/atlas.en-us.208.0.lightning.meta/lightning/security_global_access.htm

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.