From a2d44431b1b0e56db57a0075e34cb608483eb495 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 16 Feb 2015 14:30:12 +0100 Subject: [PATCH] Use "safeApply" as deferred can be resolved inside angular.js. --- static/js/directives/youtubevideo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/directives/youtubevideo.js b/static/js/directives/youtubevideo.js index 8e7d016f..2264a74a 100644 --- a/static/js/directives/youtubevideo.js +++ b/static/js/directives/youtubevideo.js @@ -74,7 +74,7 @@ define(['jquery', 'underscore', 'text!partials/youtubevideo.html', 'bigscreen'], $scope.volume = null; isYouTubeIframeAPIReady.then(function() { - $scope.$apply(function(scope) { + safeApply($scope, function(scope) { scope.youtubeAPIReady = true; }); });