Fix deprecated use of createBrowserHistory
This commit is contained in:
1 parent
c47be5bd86
commit
5d2cdeb225
2 files changed
+2
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import 'wicg-inert';
|
||||
import createHistory from 'history/createBrowserHistory';
|
||||
import { createBrowserHistory } from 'history';
|
||||
|
||||
export default class ModalRoot extends React.PureComponent {
|
||||
static contextTypes = {
|
||||
@@ -51,7 +51,7 @@ export default class ModalRoot extends React.PureComponent {
|
||||
componentDidMount () {
|
||||
window.addEventListener('keyup', this.handleKeyUp, false);
|
||||
window.addEventListener('keydown', this.handleKeyDown, false);
|
||||
this.history = this.context.router ? this.context.router.history : createHistory();
|
||||
this.history = this.context.router ? this.context.router.history : createBrowserHistory();
|
||||
}
|
||||
|
||||
componentWillReceiveProps (nextProps) {
|
||||
|
||||
Reference in new issue
Block a user