Skip to content

Commit

Permalink
fix(progress): ensure $loading is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Jan 28, 2018
1 parent 157c3a2 commit cbdc586
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugin.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const setupProgress = (axios, ctx) => {
set: () => { }
}

const $loading = () => window.$nuxt ? window.$nuxt.$loading : noopLoading
const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading

let currentRequests = 0

Expand Down

0 comments on commit cbdc586

Please sign in to comment.