Fix js error. s/typof/typeof/