JS: Undo button rendering only if input is >0