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.

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .