Skip to content

Commit

Permalink
Merge pull request #804 from mozilla/bug/sentry-errors
Browse files Browse the repository at this point in the history
Fix adapter and fileId errors
  • Loading branch information
brianpeiris authored Dec 31, 2018
2 parents cdff252 + edfd080 commit a13825d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/freeze-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ AFRAME.registerComponent("freeze-controller", {

onToggle: function() {
window.APP.store.update({ activity: { hasFoundFreeze: true } });
if (!NAF.connection.adapter) return;
NAF.connection.adapter.toggleFreeze();
if (NAF.connection.adapter.frozen) {
this.el.emit("play_freeze_sound");
Expand Down
2 changes: 2 additions & 0 deletions src/components/mute-mic.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ AFRAME.registerComponent("mute-mic", {
},

onToggle: function() {
if (!NAF.connection.adapter) return;
if (this.el.is("muted")) {
NAF.connection.adapter.enableMicrophone(true);
this.el.removeState("muted");
Expand All @@ -60,6 +61,7 @@ AFRAME.registerComponent("mute-mic", {
},

onMute: function() {
if (!NAF.connection.adapter) return;
if (!this.el.is("muted")) {
NAF.connection.adapter.enableMicrophone(false);
this.el.addState("muted");
Expand Down
3 changes: 2 additions & 1 deletion src/scene-entry-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ export default class SceneEntryManager {
const networkId = components.networked.data.networkId;
el.setAttribute("networked", { persistent: false });

const { fileId } = el.components["media-loader"].data;
const mediaLoader = components["media-loader"];
const fileId = mediaLoader.data && mediaLoader.data.fileId;

this.hubChannel.unpin(networkId, fileId);
});
Expand Down

0 comments on commit a13825d

Please sign in to comment.