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 {
449449 }
450450 },
451451 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);
456455 },
457456 swapAnnotationLabel (annotation ) {
458457 let lastLabel = annotation .labels
459458 .filter (l => l .user_id === this .user .id )
460459 .sort ((a , b ) => a .id - b .id )
461460 .pop ();
462461
463- this .attachAnnotationLabel (annotation)
462+ // Can't use attachAnnotationLabel() because detachAnnotationLabel() should
463+ // not be called on error.
464+ annotation .attachAnnotationLabel (this .selectedLabel )
464465 .then (() => {
465466 if (lastLabel) {
466467 this .detachAnnotationLabel (annotation, lastLabel);
You can’t perform that action at this time.
0 commit comments