From 6304ffe5147f2f56a59b542b96d889e9ec58062e Mon Sep 17 00:00:00 2001 From: Alexander Goryushkin Date: Sun, 28 Jan 2024 22:10:59 -0300 Subject: [PATCH] save src instead of id for external assets --- src/json-utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/json-utils.js b/src/json-utils.js index 05d471845..e3e09c8fb 100644 --- a/src/json-utils.js +++ b/src/json-utils.js @@ -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}`; }