Skip to content

Commit

Permalink
fix(dialogs): only spawn dialogs if the scene is being loaded in
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickocoffeyo committed Jul 19, 2018
1 parent 8e2c831 commit 99e50ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/aframe/components/spawnDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const spawnDialogs = {

return false;
},
shouldComponentUpdate(oldProps, newProps) {
// If scenes objects are loaded in, update.
if (!oldProps.experience.field_scenes && newProps.experience.field_scenes) {
return true;
}

return false;
},
didReceiveProps() {
this.spawn();
},
Expand Down

0 comments on commit 99e50ff

Please sign in to comment.