Skip to content

Commit

Permalink
save src instead of id for external assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Jan 29, 2024
1 parent 18002e0 commit 6304ffe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/json-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,12 @@ function toPropString (propData) {
return Object.entries(propData)
.map(([key, value]) => {
if (key == 'src') {
if (value.id) {
if (value.id && value.src.includes('assets.3dstreet.app')) {
// asset came from 3dstreet
return `${key}: #${value.id}`;
} else if (value.src && !value.src.includes('assets.3dstreet.app')) {
// asset came from external sources
return `${key}: ${value.src}`;
} else {
return `${key}: ${value}`;
}
Expand Down

0 comments on commit 6304ffe

Please sign in to comment.