Skip to content

Commit c31219d

Browse files
committed
Sentry fix: protect against undefined event arg (selectClip / selectTransition)
1 parent ef046ac commit c31219d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/timeline/js/controllers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ App.controller("TimelineCtrl", function ($scope) {
579579
$scope.selectTransition("", true);
580580
}
581581
// Call slice method and exit (don't actually select the clip)
582-
if (id !== "" && $scope.enable_razor && $scope.Qt && event) {
582+
if (id !== "" && $scope.enable_razor && $scope.Qt && typeof event !== 'undefined') {
583583
var cursor_seconds = $scope.getJavaScriptPosition(event.clientX, null).position;
584584
timeline.RazorSliceAtCursor(id, "", cursor_seconds);
585585

@@ -632,7 +632,7 @@ App.controller("TimelineCtrl", function ($scope) {
632632
$scope.selectClip("", true);
633633
}
634634
// Call slice method and exit (don't actually select the transition)
635-
if (id !== "" && $scope.enable_razor && $scope.Qt && event) {
635+
if (id !== "" && $scope.enable_razor && $scope.Qt && typeof event !== 'undefined') {
636636
var cursor_seconds = $scope.getJavaScriptPosition(event.clientX, null).position;
637637
timeline.RazorSliceAtCursor("", id, cursor_seconds);
638638

0 commit comments

Comments
 (0)