Skip to content

Commit a04fc44

Browse files
committed
Fix for Sentry OPENSHOT-1P: TypeError: Cannot read property 'has_video' of undefined
1 parent c23c4f8 commit a04fc44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/timeline/js/controllers.js

+5
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,11 @@ App.controller("TimelineCtrl", function ($scope) {
688688
* @return {string}
689689
*/
690690
$scope.getThumbPath = function (clip) {
691+
if (!clip || !clip["reader"]) {
692+
console.error("Invalid clip object or missing reader property in getThumbPath");
693+
return "../images/NotFound.svg";
694+
}
695+
691696
var has_video = clip["reader"]["has_video"];
692697
var has_audio = clip["reader"]["has_audio"];
693698
if (!has_video && has_audio) {

0 commit comments

Comments
 (0)