@nuxtjs/axios
Advanced tools
Comparing version 5.10.2 to 5.10.3
@@ -5,2 +5,9 @@ # Changelog | ||
### [5.10.3](https://github.com/nuxt-community/axios-module/compare/v5.10.2...v5.10.3) (2020-04-30) | ||
### Bug Fixes | ||
* globalName fallback for nuxt < 2.2.0 ([12da6c8](https://github.com/nuxt-community/axios-module/commit/12da6c8e2feb8cf4f7e918fbbe4693400152c1ff)) | ||
### [5.10.2](https://github.com/nuxt-community/axios-module/compare/v5.10.1...v5.10.2) (2020-04-27) | ||
@@ -7,0 +14,0 @@ |
@@ -97,2 +97,5 @@ const path = require('path') | ||
// globalName | ||
options.globalName = this.nuxt.options.globalName || 'nuxt' | ||
// Register plugin | ||
@@ -99,0 +102,0 @@ this.addPlugin({ |
@@ -5,3 +5,3 @@ import Axios from 'axios' | ||
const globalName = '$<%= globalName %>' | ||
const $nuxt = typeof window !== 'undefined' && window['$<%= options.globalName %>'] | ||
@@ -132,3 +132,3 @@ // Axios.prototype cannot be modified | ||
const $loading = () => (window[globalName] && window[globalName].$loading && window[globalName].$loading.set) ? window[globalName].$loading : noopLoading | ||
const $loading = () => ($nuxt && $nuxt.$loading && $nuxt.$loading.set) ? $nuxt.$loading : noopLoading | ||
@@ -135,0 +135,0 @@ let currentRequests = 0 |
{ | ||
"name": "@nuxtjs/axios", | ||
"version": "5.10.2", | ||
"version": "5.10.3", | ||
"description": "Secure and easy axios integration with Nuxt.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41354
335