File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export class LocalScheme<
9999 const token = this . token . sync ( )
100100
101101 // Token is required but not available
102- if ( this . options . token . required && ! token ) {
102+ if ( ! token ) {
103103 return response
104104 }
105105
@@ -248,13 +248,11 @@ export class LocalScheme<
248248 }
249249
250250 protected updateTokens ( response : HTTPResponse ) : void {
251- if ( this . options . token . required ) {
252- const token = getResponseProp (
253- response ,
254- this . options . token . property
255- ) as string
256- this . token . set ( token )
257- }
251+ const token = this . options . token . required
252+ ? ( getResponseProp ( response , this . options . token . property ) as string )
253+ : true
254+
255+ this . token . set ( token )
258256 }
259257
260258 protected initializeRequestInterceptor ( ) : void {
You can’t perform that action at this time.
0 commit comments