Skip to content

Commit

Permalink
refactor: replace process.browser with process.client (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
takumiz19 authored Oct 25, 2021
1 parent 81be741 commit a99b56c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const setupDebugInterceptor = axios => {
'[' + res.config.method.toUpperCase() + ']',
res.config.url)

if (process.browser) {
if (process.client) {
console.log(res)
} else {
console.log(JSON.stringify(res.data, undefined, 2))
Expand Down Expand Up @@ -193,7 +193,7 @@ export default (ctx, inject) => {
// runtimeConfig
const runtimeConfig = ctx.$config && ctx.$config.axios || {}
// baseURL
const baseURL = process.browser
const baseURL = process.client
? (runtimeConfig.browserBaseURL || runtimeConfig.browserBaseUrl || runtimeConfig.baseURL || runtimeConfig.baseUrl || '<%= options.browserBaseURL || '' %>')
: (runtimeConfig.baseURL || runtimeConfig.baseUrl || process.env._AXIOS_BASE_URL_ || '<%= options.baseURL || '' %>')

Expand Down

0 comments on commit a99b56c

Please sign in to comment.