Remove trailing slash when no points are spent
This commit is contained in:
@@ -50,7 +50,7 @@ export class Calculator extends React.PureComponent<Props> {
|
|||||||
this.setState({ knownTalents: newKnownTalents })
|
this.setState({ knownTalents: newKnownTalents })
|
||||||
|
|
||||||
const pointString = encodeKnownTalents(newKnownTalents, selectedClass)
|
const pointString = encodeKnownTalents(newKnownTalents, selectedClass)
|
||||||
this.props.history.replace(`/${selectedClass}/${pointString}`)
|
this.props.history.replace(`/${selectedClass}` + (pointString ? `/${pointString}` : ''))
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user