- fixed js error when script is run on page without input element