From b850fc0a0dbe25a4405545a017bf8bf35e2c7f19 Mon Sep 17 00:00:00 2001 From: pkova Date: Sun, 16 Feb 2020 00:32:12 +0200 Subject: [PATCH] chat: fix station string format --- pkg/interface/chat/src/js/components/chat.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/interface/chat/src/js/components/chat.js b/pkg/interface/chat/src/js/components/chat.js index 0a9661ca2..2d1919db1 100644 --- a/pkg/interface/chat/src/js/components/chat.js +++ b/pkg/interface/chat/src/js/components/chat.js @@ -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 ||