about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-04-09 16:12:28 +0200
committerThibG <thib@sitedethib.com>2020-04-09 17:03:05 +0200
commit5d2cdeb2255f49abd7756e5e6d94b16ad1f7df90 (patch)
treeee26fa76d04874421781a3b1e6970410d422e0ce
parentc47be5bd864a1f5244f35122ba7fae31a149c73d (diff)
Fix deprecated use of createBrowserHistory
-rw-r--r--app/javascript/core/public.js1
-rw-r--r--app/javascript/flavours/glitch/components/modal_root.js4
2 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/core/public.js b/app/javascript/core/public.js
index 39f198fe7..8c26f1404 100644
--- a/app/javascript/core/public.js
+++ b/app/javascript/core/public.js
@@ -1,6 +1,5 @@
 //  This file will be loaded on public pages, regardless of theme.
 
-import createHistory from 'history/createBrowserHistory';
 import ready from '../mastodon/ready';
 
 const { delegate } = require('@rails/ujs');
diff --git a/app/javascript/flavours/glitch/components/modal_root.js b/app/javascript/flavours/glitch/components/modal_root.js
index f9877d5ea..8d73a1e40 100644
--- a/app/javascript/flavours/glitch/components/modal_root.js
+++ b/app/javascript/flavours/glitch/components/modal_root.js
@@ -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) {