mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 18:54:03 +08:00
Fix null value in backend Translate()
This commit is contained in:
parent
f934531083
commit
f2e3182a69
@ -108,10 +108,10 @@ func GetLanguage(language string) string {
|
||||
return "en"
|
||||
}
|
||||
|
||||
if len(language) < 2 {
|
||||
if len(language) != 2 {
|
||||
return "en"
|
||||
} else {
|
||||
return language[0:2]
|
||||
return language
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class PaymentEditPage extends React.Component {
|
||||
}
|
||||
|
||||
getPayment() {
|
||||
PaymentBackend.getPayment(this.props.account.owner, this.state.paymentName)
|
||||
PaymentBackend.getPayment("admin", this.state.paymentName)
|
||||
.then((payment) => {
|
||||
this.setState({
|
||||
payment: payment,
|
||||
|
Loading…
x
Reference in New Issue
Block a user