Skip to content

Commit

Permalink
Protected if no images
Browse files Browse the repository at this point in the history
Removed console.logs
  • Loading branch information
olivierpicciotto committed Jul 2, 2024
1 parent e04ca92 commit 1bd0c34
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions _c8oProject/mobileSharedComponents/BaseRowGrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,19 @@ comment: |
// return the html string
let html = '''';
let value = data.value;
for (let i = 0; i < value.length; i++) {
html += ''<img src="'' + value[i].thumbnails.tiny.url +
''" title="'' + value[i].name +
''" style="height: 20px; border: solid 1px grey; border-radius: 4px; margin-right: 4px "/>'';
if (value instanceof Array) {
for (let i = 0; i < value.length; i++) {
html += ''<img src="'' + value[i].thumbnails.tiny.url +
''" title="'' + value[i].name +
''" style="height: 20px; border: solid 1px grey; border-radius: 4px; margin-right: 4px "/>'';
}
// now create a dom object from the html string
let div = document.createElement(''div'');
div.innerHTML = html;
// return the dom object
return div;
}
// now create a dom object from the html string
let div = document.createElement(''div'');
div.innerHTML = html;
// return the dom object
return div;
}
resolve();
Expand Down

0 comments on commit 1bd0c34

Please sign in to comment.