diff --git a/js/models/blockchain/Insight.js b/js/models/blockchain/Insight.js index e509fc523..863863e70 100644 --- a/js/models/blockchain/Insight.js +++ b/js/models/blockchain/Insight.js @@ -226,6 +226,7 @@ Insight.prototype._requestNode = function(options, callback) { }; Insight.prototype._requestBrowser = function(options, callback) { + var self = this; var request = new XMLHttpRequest(); var url = (options.schema || 'http') + '://' + options.host; @@ -248,6 +249,7 @@ Insight.prototype._requestBrowser = function(options, callback) { return callback(new Error('Insight request timeout')); }; + request.onreadystatechange = function() { if (request.readyState !== 4) return; var ret, errTxt, e; diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 96f8322ff..82386f91c 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -4,8 +4,9 @@ var bitcore = require('bitcore'); angular.module('copayApp.services') .factory('controllerUtils', function($rootScope, $sce, $location, notification, $timeout, Socket, video, uriHandler) { var root = {}; - root.getVideoMutedStatus = function(copayer) { + if (!$rootScope.videoInfo) return; + var vi = $rootScope.videoInfo[copayer] if (!vi) { return;