prevent conditional attribute from updating if element is not rendered