folding for dist js error