fix tern js error