File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
resources/assets/js/videos Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -449,18 +449,19 @@ export default {
449
449
}
450
450
},
451
451
attachAnnotationLabel (annotation ) {
452
- let promise = annotation .attachAnnotationLabel (this .selectedLabel );
453
- promise .catch (handleErrorResponse);
454
-
455
- return promise;
452
+ annotation
453
+ .attachAnnotationLabel (this .selectedLabel )
454
+ .catch (handleErrorResponse);
456
455
},
457
456
swapAnnotationLabel (annotation ) {
458
457
let lastLabel = annotation .labels
459
458
.filter (l => l .user_id === this .user .id )
460
459
.sort ((a , b ) => a .id - b .id )
461
460
.pop ();
462
461
463
- this .attachAnnotationLabel (annotation)
462
+ // Can't use attachAnnotationLabel() because detachAnnotationLabel() should
463
+ // not be called on error.
464
+ annotation .attachAnnotationLabel (this .selectedLabel )
464
465
.then (() => {
465
466
if (lastLabel) {
466
467
this .detachAnnotationLabel (annotation, lastLabel);
You can’t perform that action at this time.
0 commit comments