Skip to content

Commit

Permalink
fix double loading of streetmixjson
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Sep 28, 2023
1 parent d35f7be commit a9ad14d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ AFRAME.registerComponent('streetmix-loader', {

// load street from provided JSON with streetmix format
if (data.streetmixJSON !== '') {
this.loadFromJSON(data.streetmixJSON);
data.streetmixJSON == '';
const newStreetmixJSON = data.streetmixJSON;
el.setAttribute('streetmix-loader', 'streetmixJSON', '');
this.loadFromJSON(newStreetmixJSON);
return;
}

Expand Down

0 comments on commit a9ad14d

Please sign in to comment.