use pathname only when an empty state is emitted