7 [YEP] [Buffs & States Core] Damage Conversion ignoring Element check?

Hello there, makers!
I've been working in a special skill for my game.
The character uses a skill called "Elemental Aura", which leads to a choice section.
Each choice leads to the apply of a different State, called "[Selected Element] Aura"

All these states to the same thing: while active, any damage provided by the element of choice is converted into TP gain.

The code for the conversion is shown below:
Code:
<Custom React Effect>
var element = this.item().damage.elementId;
if (this.isHpEffect() && value > 0)
  {
  if (element = 4)  \\ This is the Fire Aura state, which checks if the damage taken is Fire (Element 4) type.
    {
    var tp = value;
    value = 0;
    target.gainTp(tp);
    target.clearResult();
    target.startAnimation(135);
    }
  else
    {
    target.removeState(11); \\This is the ID of the Fire Aura State.
    }
  }
</Custom React Effect>

My problem is: The element checking is being completely ignored! As it is right now, any Aura state is being able to convert any element damage!
if (element == 4)

Need double equal marks!

Original thread: https://forums.rpgmakerweb.com/threads/7-yep-buffs-states-core-damage-conversion-ignoring-element-check.83096/