Fix js error when logging is blocked.