hide the element if nodes is empty