Fix npm run build

In order to fix this issue:
https://github.com/facebook/create-react-app/issues/3734

Switch from 'query-string' to 'qs'
This commit is contained in:
Anthony Laibe 2018-09-21 09:35:36 +01:00 committed by Pascal Precht
parent 2fb5d907ec
commit 0c7e934269
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
3 changed files with 4 additions and 18 deletions

View File

@ -8854,15 +8854,6 @@
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"query-string": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.1.0.tgz",
"integrity": "sha512-pNB/Gr8SA8ff8KpUFM36o/WFAlthgaThka5bV19AD9PNTH20Pwq5Zxodif2YyHwrctp6SkL4GqlOot0qR/wGaw==",
"requires": {
"decode-uri-component": "^0.2.0",
"strict-uri-encode": "^2.0.0"
}
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
@ -10263,11 +10254,6 @@
"xtend": "^4.0.0"
}
},
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
},
"string-length": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz",

View File

@ -11,7 +11,7 @@
"connected-react-router": "^4.3.0",
"history": "^4.7.2",
"prop-types": "^15.6.2",
"query-string": "^6.1.0",
"qs": "^6.5.2",
"react": "^16.4.2",
"react-ace": "^6.1.4",
"react-copy-to-clipboard": "^5.0.1",

View File

@ -2,11 +2,9 @@ import PropTypes from "prop-types";
import {connect} from 'react-redux';
import React, {Component} from 'react';
import {withRouter} from "react-router-dom";
import routes from '../routes';
import Unauthenticated from '../components/Unauthenticated';
import Layout from "../components/Layout";
import queryString from 'query-string';
import {
initBlockHeader,
@ -18,6 +16,8 @@ import {
import { getToken, getAuthenticationError } from '../reducers/selectors';
const qs = require('qs');
class AppContainer extends Component {
constructor (props) {
super(props);
@ -29,7 +29,7 @@ class AppContainer extends Component {
if (!this.props.location.search) {
return;
}
const token = queryString.parse(this.props.location.search).token;
const token = qs.parse(this.props.location.search, {ignoreQueryPrefix: true}).token;
if (token === this.props.token) {
return;
}