Resolved by placing the below condition on the Erase Button:
image