Skip to content

Commit

Permalink
Merge pull request #1252 from tomivm/fix/uploaded-images-on-development
Browse files Browse the repository at this point in the history
set the default imageUrl on the tiles that aren't for production
  • Loading branch information
martinbedouret authored Aug 9, 2022
2 parents 2959a77 + 669ab64 commit 25fac7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Board/TileEditor/TileEditor.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class TileEditor extends Component {
try {
const imageUrl = await API.uploadFile(blob, fileName);
// console.log('imagen guardada en servidor', imageUrl);
return convertImageUrlToCatchable(imageUrl);
return convertImageUrlToCatchable(imageUrl) || imageUrl;
} catch (error) {
//console.log('imagen no guardad en servidor');
return await this.blobToBase64(blob);
Expand Down
1 change: 1 addition & 0 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ export const convertImageUrlToCatchable = imageUrl => {
};

if (isCboardProductionBlobContainer) return cboardBlobUsingCDN(imageUrl);
return null;
};

0 comments on commit 25fac7a

Please sign in to comment.