fix "unexpected |" js error