Commit 46ebe20b authored by 吕祺's avatar 吕祺 ⛹🏽

fix

parent c0ba39ba
......@@ -38,7 +38,12 @@ export default class PortfolioPage extends Component {
})
}
renderPortfolio(portfolio, key, mounted) {
const n = portfolio.name.replace(/ |\+|\./g, '')
var n = ''
if(portfolio.name) {
n = portfolio.name.replace(/ |\+|\./g, '')
} else {
n = portfolio.nameEN.replace(/ |\+|\./g, '')
}
if (mounted) {
return (
<div key={key} className="portfolio-image-wrapper">
......@@ -103,8 +108,8 @@ export default class PortfolioPage extends Component {
dayEN
}
} = portfolioPage
const {attributes: portfolio } = portfolioChi
const {attributes: portfolioEN } = portfolioEnglish
const {attributes: { portfolio } } = portfolioChi
const {attributes: { portfolioEN } } = portfolioEnglish
const { showType, selected, mounted } = this.state
return (
<ThemeContext.Consumer>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment