Fixed js error in caseview