File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import Axios from 'axios'
22import defu from 'defu'
33< % if ( options . retry ) { % > import axiosRetry from 'axios-retry' < % } % >
44
5- const $nuxt = typeof window !== 'undefined' && window [ '$<%= options.globalName %>' ]
6-
75// Axios.prototype cannot be modified
86const axiosExtra = {
97 setBaseURL ( baseURL ) {
@@ -128,7 +126,10 @@ const setupProgress = (axios) => {
128126 set : ( ) => { }
129127 }
130128
131- const $loading = ( ) => ( $nuxt && $nuxt . $loading && $nuxt . $loading . set ) ? $nuxt . $loading : noopLoading
129+ const $loading = ( ) => {
130+ const $nuxt = typeof window !== 'undefined' && window [ '$<%= options.globalName %>' ]
131+ return ( $nuxt && $nuxt . $loading && $nuxt . $loading . set ) ? $nuxt . $loading : noopLoading
132+ }
132133
133134 let currentRequests = 0
134135
You can’t perform that action at this time.
0 commit comments