Skip to content

Commit 0bb5f7e

Browse files
Fix getToken() #19
1 parent 3429420 commit 0bb5f7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/interface.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ export default defineComponent({
342342
}
343343
344344
function getToken() {
345-
return api.defaults.headers?.['Authorization']?.split(' ')[1] || null;
345+
return api.defaults.headers?.['Authorization']?.split(' ')[1]
346+
|| api.defaults.headers?.common?.['Authorization']?.split(' ')[1]
347+
|| null;
346348
}
347349
348350
function addTokenToURL(url, token) {

0 commit comments

Comments
 (0)