Using the recommended approach to abort a request, it doesn't work. this.currentRequest is always null even when there is another request in progress. The strange part is that Vue devtools shows that this.currentRequest does in fact exist on the component.
If I change currentRequest to be a global variable then it works. It's the same behavior noted by someone else in https://github.com/pagekit/vue-resource/issues/38#issuecomment-136278410. Why is this.currentRequest always null? In the before function this refers to the component, so it's not that this isn't set properly.
Using the recommended approach to abort a request, it doesn't work.
this.currentRequest
is always null even when there is another request in progress. The strange part is that Vue devtools shows thatthis.currentRequest
does in fact exist on the component.If I change
currentRequest
to be a global variable then it works. It's the same behavior noted by someone else in https://github.com/pagekit/vue-resource/issues/38#issuecomment-136278410. Why isthis.currentRequest
always null? In thebefore
functionthis
refers to the component, so it's not thatthis
isn't set properly.