Fix js error happening with runtime client check