这是执行重定向的代码部分:
render() {
return <div>
<Router>
<Switch>
<Route path='/:locale(en|he)' component={this.routes} />
<Redirect to="`${props.location.pathname}/he`"/>
</Switch>
</Router>
</div>
}
您知道如何解决此错误吗?