wcmmode.edit not working in personalization for HTL
Hey everyone, I'm facing an issue with my HTL code and contexthub personalization (Targeting).
The thing is that I've a validation using wcmmode.edit. Something like this:
<sly data-sly-test.authorMode="${wcmmode.edit || wcmmode.preview}"/>
<div class="${authorMode ? 'author-mode' : 'full-width'}">My text</div>
The problem is that if the component is targeted and I switch from edit mode to wcmmode.disabled the component loads with wcmmode.edit = false but after a second it changes to wcmmode.edit = true.
I can tell this because I put the component twice in my page then I've applied a target to one of the two and I'm printing the wcmmode.edit in a <h1> tag.
How can I manage the wcmmode when the component is targeted?
I'm working on AEM 6.2 sp2