Skip to content

Commit f71be43

Browse files
committed
Update promise bind methods
1 parent 826ff28 commit f71be43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/assets/js/annotations/stores/annotations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Annotations {
6767
.catch(function () {
6868
return Vue.Promise.reject(`Failed to load annotations for image ${id}!`);
6969
})
70-
.then(this.parseResponse)
70+
.then(this.parseResponse.bind(this))
7171
.then(this.resolveAllShapes.bind(this));
7272
}
7373

@@ -79,9 +79,9 @@ class Annotations {
7979
delete annotation.shape;
8080

8181
return ImagesApi.saveAnnotations({id: imageId}, annotation)
82-
.then(this.parseResponse)
82+
.then(this.parseResponse.bind(this))
8383
.then(this.resolveShape.bind(this))
84-
.then(this.setDeselected)
84+
.then(this.setDeselected.bind(this))
8585
.then((annotation) => {
8686
this.cache[imageId].then(function (annotations) {
8787
annotations.unshift(annotation);

0 commit comments

Comments
 (0)