@@ -848,7 +848,9 @@ App.controller("TimelineCtrl", function ($scope) {
848
848
timeline . add_missing_transition ( JSON . stringify ( missing_transition_details ) ) ;
849
849
}
850
850
// Remove manual move stylesheet
851
- bounding_box . element . removeClass ( "manual-move" ) ;
851
+ if ( bounding_box . element ) {
852
+ bounding_box . element . removeClass ( "manual-move" ) ;
853
+ }
852
854
853
855
// Remove CSS class (after the drag)
854
856
bounding_box = { } ;
@@ -894,7 +896,7 @@ App.controller("TimelineCtrl", function ($scope) {
894
896
bounding_box . track_position = 0 ;
895
897
896
898
// Set z-order to be above other clips/transitions
897
- if ( item_type !== "os_drop" ) {
899
+ if ( item_type !== "os_drop" && bounding_box . element ) {
898
900
bounding_box . element . addClass ( "manual-move" ) ;
899
901
}
900
902
} ;
@@ -938,8 +940,10 @@ App.controller("TimelineCtrl", function ($scope) {
938
940
}
939
941
}
940
942
//change the element location
941
- bounding_box . element . css ( "left" , results . position . left ) ;
942
- bounding_box . element . css ( "top" , bounding_box . track_position - scrolling_tracks_offset_top ) ;
943
+ if ( bounding_box . element ) {
944
+ bounding_box . element . css ( "left" , results . position . left ) ;
945
+ bounding_box . element . css ( "top" , bounding_box . track_position - scrolling_tracks_offset_top ) ;
946
+ }
943
947
} ;
944
948
945
949
// Update X,Y indexes of tracks / layers (anytime the project.layers scope changes)
0 commit comments