diff --git a/mapbox.html b/mapbox.html index 194a9a2e0..ba1621781 100644 --- a/mapbox.html +++ b/mapbox.html @@ -98,17 +98,17 @@ streetmix-loader="streetmixStreetURL: https://streetmix.net/scott/31/south-van-ness-idea-short-term; showBuildings: false;" > - - - - - - - - + + + + + + + + - diff --git a/src/json-utils.js b/src/json-utils.js index 05d471845..546954b3f 100644 --- a/src/json-utils.js +++ b/src/json-utils.js @@ -184,10 +184,11 @@ function filterJSONstreet (removeProps, renameProps, streetJSON) { } let stringJSON = JSON.stringify(streetJSON, function replacer (key, value) { - const compAttributes = AFRAME.utils.styleParser.parse(value); + let compAttributes; for (var removeKey in removeProps) { // check for removing components if (key === removeKey) { + compAttributes = AFRAME.utils.styleParser.parse(value); const removeVal = removeProps[removeKey]; // check for deleting component's attribute if (typeof removeVal === 'object' && !isEmpty(removeVal)) { @@ -210,7 +211,7 @@ function filterJSONstreet (removeProps, renameProps, streetJSON) { } } - return compAttributes; + return compAttributes || value; }); // rename components for (var renameKey in renameProps) {