Fix JS error after project pdf file.

This commit is contained in:
Emanuel Schütze 2016-11-30 22:26:11 +01:00
parent 5ab8b3172b
commit bc312efbb9

View File

@ -23,6 +23,7 @@ angular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles'
// Allow the elements to render properly // Allow the elements to render properly
setTimeout(function() { setTimeout(function() {
if ($scope.mediafile) {
if ($scope.mediafile.is_pdf) { if ($scope.mediafile.is_pdf) {
$scope.pdfName = mediafile.title; $scope.pdfName = mediafile.title;
$scope.pdfUrl = mediafile.mediafileUrl; $scope.pdfUrl = mediafile.mediafileUrl;
@ -34,6 +35,7 @@ angular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles'
player.pause(); player.pause();
} }
} }
}
}, 0); }, 0);
} }
]); ]);