Skip to content

Commit

Permalink
fix for image caption on the edit image
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbedouret committed Mar 10, 2020
1 parent 5cf77be commit e3decd2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ class CommunicatorDialogBoardItem extends React.Component {
isCordova() && board.caption && board.caption.search('/') === 0
? `.${board.caption}`
: board.caption;
const imageBoard =
isCordova() &&
this.state.imageBoard &&
this.state.imageBoard.search('/') === 0
? `.${this.state.imageBoard}`
: this.state.imageBoard;

return (
<div className="CommunicatorDialog__boards__item">
Expand Down Expand Up @@ -301,7 +307,7 @@ class CommunicatorDialogBoardItem extends React.Component {
</Button>
<InputImage onChange={this.handleBoardImageChange.bind(this)} />
{!!this.state.imageBoard && (
<img src={this.state.imageBoard} alt={board.name} />
<img src={imageBoard} alt={board.name} />
)}
</DialogContent>
<DialogActions>
Expand Down

0 comments on commit e3decd2

Please sign in to comment.