Fix bug for petal-router: if js loaded, process end