From 669ab64e3e06149113ca06ba59183c049114b869 Mon Sep 17 00:00:00 2001 From: tomivm Date: Fri, 5 Aug 2022 11:29:23 -0300 Subject: [PATCH] set the default imageUrl on the tiles that aren't for production --- src/components/Board/TileEditor/TileEditor.component.js | 2 +- src/helpers.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Board/TileEditor/TileEditor.component.js b/src/components/Board/TileEditor/TileEditor.component.js index 9f0059e95..99ee4d24d 100644 --- a/src/components/Board/TileEditor/TileEditor.component.js +++ b/src/components/Board/TileEditor/TileEditor.component.js @@ -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); diff --git a/src/helpers.js b/src/helpers.js index 1ad01de05..a1b885bb1 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -36,4 +36,5 @@ export const convertImageUrlToCatchable = imageUrl => { }; if (isCboardProductionBlobContainer) return cboardBlobUsingCDN(imageUrl); + return null; };