Closed Fox155 closed 3 years ago
Good afternoon, when I want to delete the token in the following way
this.$axios.setToken(false, 'Bearer', [ 'get', 'post', 'delete', 'put', 'patch', ])
I noticed that it was not being completely deleted, and after a little digging I came to the conclusion that the setHeader function is returning before going through all the scope.
setHeader
https://github.com/nuxt-community/axios-module/blob/a9e4867587cd60a25aca441159938495d41755c9/lib/plugin.js#L10-L18
I propose to change that return for a continue, because otherwise only the first element of the scope is deleted.
return
continue
Greetings.
Thanks for notice @Fox155. PR welcome for fix.
Thanks! https://github.com/nuxt-community/axios-module/releases/tag/v5.13.6
Good afternoon, when I want to delete the token in the following way
this.$axios.setToken(false, 'Bearer', [ 'get', 'post', 'delete', 'put', 'patch', ])
I noticed that it was not being completely deleted, and after a little digging I came to the conclusion that the
setHeader
function is returning before going through all the scope.https://github.com/nuxt-community/axios-module/blob/a9e4867587cd60a25aca441159938495d41755c9/lib/plugin.js#L10-L18
I propose to change that
return
for acontinue
, because otherwise only the first element of the scope is deleted.Greetings.