medusa-ui/medusa

m-click resolve the attributes before sending the event

Closed this issue · 1 comments

Given a UIEventController with a modelMap containing: uuid= xyz, by=5

When:
<button m-click="increaseMyCounter('$uuid',$by)">Increase my counter by [$increase]</button>
(correctly) parsed to:
<button onclick="_M.sendEvent(this, 'increaseMyCounter(\'$uuid\',$by)')">Increase my counter by <span from-value="increase">5</span></button>

Then:
websocket.js send this event to the controller: increaseMyCounter("$uuid",$by) which causes an exception.

Solution: resolve the attributes before sending the event

lgtm