Fix null value in backend Translate()

This commit is contained in:
Yang Luo 2023-06-07 02:10:35 +08:00
parent f934531083
commit f2e3182a69
2 changed files with 3 additions and 3 deletions

View File

@ -108,10 +108,10 @@ func GetLanguage(language string) string {
return "en" return "en"
} }
if len(language) < 2 { if len(language) != 2 {
return "en" return "en"
} else { } else {
return language[0:2] return language
} }
} }

View File

@ -40,7 +40,7 @@ class PaymentEditPage extends React.Component {
} }
getPayment() { getPayment() {
PaymentBackend.getPayment(this.props.account.owner, this.state.paymentName) PaymentBackend.getPayment("admin", this.state.paymentName)
.then((payment) => { .then((payment) => {
this.setState({ this.setState({
payment: payment, payment: payment,