Skip to content

Commit ed25d27

Browse files
committed
unset the token AFTER sending the logout request
1 parent 7c25ec0 commit ed25d27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kuzzle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,12 +533,12 @@ Kuzzle.prototype.logout = function (cb) {
533533
body: {}
534534
};
535535

536-
self.unsetJwtToken();
537-
538536
this.query({controller: 'auth', action: 'logout'}, request, {queuable: false}, typeof cb !== 'function' ? null : function(error) {
539537
cb(error, self);
540538
});
541539

540+
self.unsetJwtToken();
541+
542542
return self;
543543
};
544544

0 commit comments

Comments
 (0)