chat: fix station string format

This commit is contained in:
pkova 2020-02-16 00:32:12 +02:00
parent 1106e4b5b3
commit b850fc0a0d

View File

@ -44,7 +44,10 @@ export class ChatScreen extends Component {
componentDidUpdate(prevProps, prevState) {
const { props, state } = this;
const station = `/${props.match.params.ship}/${props.match.params.station}`
const station =
props.match.params[1] === undefined ?
`/${props.match.params.ship}/${props.match.params.station}` :
`/${props.match.params[1]}/${props.match.params.ship}/${props.match.params.station}`;
if (
prevProps.match.params.station !== props.match.params.station ||