From 05f573d181654c362dd4c76649de2b8415c6cb5a Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Sun, 24 May 2020 07:38:03 -0400 Subject: [PATCH 1/2] Added check if content-type header is present for transformResponse --- functions/strategies/AxiosStrategy.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions/strategies/AxiosStrategy.js b/functions/strategies/AxiosStrategy.js index f38a94064..1deda3333 100644 --- a/functions/strategies/AxiosStrategy.js +++ b/functions/strategies/AxiosStrategy.js @@ -15,9 +15,10 @@ const axiosWithoutProxy = async (req, _store) => { (data, headers) => { // If the response has a JSON content type, try parsing it if ( - headers["content-type"].startsWith("application/json") || - headers["content-type"].startsWith("application/vnd.api+json") || - headers["content-type"].startsWith("application/hal+json") + headers["content-type"] && + (headers["content-type"].startsWith("application/json") || + headers["content-type"].startsWith("application/vnd.api+json") || + headers["content-type"].startsWith("application/hal+json")) ) { try { const jsonData = JSON.parse(data) From 07ba60ab6748bba3c3a1f6dd443894351360b366 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 26 May 2020 00:29:45 +0000 Subject: [PATCH 2/2] chore(deps): bump nuxt-i18n from 6.11.1 to 6.12.0 Bumps [nuxt-i18n](https://github.com/nuxt-community/nuxt-i18n) from 6.11.1 to 6.12.0. - [Release notes](https://github.com/nuxt-community/nuxt-i18n/releases) - [Changelog](https://github.com/nuxt-community/nuxt-i18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/nuxt-community/nuxt-i18n/compare/v6.11.1...v6.12.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96d1db177..0f4fd3438 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9606,9 +9606,9 @@ } }, "nuxt-i18n": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.11.1.tgz", - "integrity": "sha512-nyr53JhHRoF3Ig6slUaXRALtAUOyGbKonL5AcNXxGkRdHpzF9HJ6mZ13W2wZCf2AiH3XatRYEh6GAmwLAOUj3A==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.12.0.tgz", + "integrity": "sha512-d4bn8J13XVyCIbt2ARq7tk+9yiN4rrWAkCe/UA/pvhkJGAxUbrO56xL4xIPzSlT5fZ66lqTssxKq/F7H9MTMdA==", "requires": { "@babel/parser": "^7.5.5", "@babel/traverse": "^7.5.5", @@ -13899,9 +13899,9 @@ "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, "vue-i18n": { - "version": "8.17.5", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.17.5.tgz", - "integrity": "sha512-gijXwvyTH3aeJhuq8EoQ9SDDlm1mgJexNccSK1ctalxsa6C7ifbWiH7V/YGfm9WJ7udYoD8ezfZdazxxvKvKYw==" + "version": "8.17.7", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.17.7.tgz", + "integrity": "sha512-7IQJ+72IIIxfR6Mt+X6EDmMP1i5oETFpc0FttnWKA9cgacf1DAlyho1aTItekG+AkbNs6nz4q3sYrXaPdC0irA==" }, "vue-loader": { "version": "15.9.1", diff --git a/package.json b/package.json index 58fa438e8..040f8c530 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "graphql": "^14.6.0", "graphql-language-service-interface": "^2.3.3", "nuxt": "^2.12.2", - "nuxt-i18n": "^6.11.1", + "nuxt-i18n": "^6.12.0", "paho-mqtt": "^1.1.0", "socket.io-client": "^2.3.0", "socketio-wildcard": "^2.0.0",