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

fix

parent c0ba39ba
...@@ -38,7 +38,12 @@ export default class PortfolioPage extends Component { ...@@ -38,7 +38,12 @@ export default class PortfolioPage extends Component {
}) })
} }
renderPortfolio(portfolio, key, mounted) { 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) { if (mounted) {
return ( return (
<div key={key} className="portfolio-image-wrapper"> <div key={key} className="portfolio-image-wrapper">
...@@ -103,8 +108,8 @@ export default class PortfolioPage extends Component { ...@@ -103,8 +108,8 @@ export default class PortfolioPage extends Component {
dayEN dayEN
} }
} = portfolioPage } = portfolioPage
const {attributes: portfolio } = portfolioChi const {attributes: { portfolio } } = portfolioChi
const {attributes: portfolioEN } = portfolioEnglish const {attributes: { portfolioEN } } = portfolioEnglish
const { showType, selected, mounted } = this.state const { showType, selected, mounted } = this.state
return ( return (
<ThemeContext.Consumer> <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