Skip to content

Commit 2adaa4f

Browse files
Fix rare race condition bug
1 parent c9f75bf commit 2adaa4f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/player/modules/AnnotationsController/module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,9 @@
722722

723723
} else {
724724

725-
ViewVideo.AnnotationTimeline.droppable('destroy');
725+
if (ViewVideo.AnnotationTimeline.hasClass('ui-droppable')) {
726+
ViewVideo.AnnotationTimeline.droppable('destroy');
727+
}
726728

727729
}
728730

src/player/modules/CodeSnippetsController/module.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,9 @@ FrameTrail.defineModule('CodeSnippetsController', function(FrameTrail){
434434

435435
} else {
436436

437-
438-
ViewVideo.CodeSnippetTimeline.droppable('destroy');
437+
if (ViewVideo.CodeSnippetTimeline.hasClass('ui-droppable')) {
438+
ViewVideo.CodeSnippetTimeline.droppable('destroy');
439+
}
439440

440441
}
441442

src/player/modules/OverlaysController/module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,9 @@ FrameTrail.defineModule('OverlaysController', function(FrameTrail){
576576

577577
} else {
578578

579-
ViewVideo.OverlayContainer.droppable('destroy');
579+
if (ViewVideo.OverlayContainer.hasClass('ui-droppable')) {
580+
ViewVideo.OverlayContainer.droppable('destroy');
581+
}
580582

581583
}
582584

0 commit comments

Comments
 (0)