about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
authornzws✨ <git@nzws.me>2019-09-18 22:41:50 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-09-18 15:41:50 +0200
commitd0c2c5278391b82ba7fa2f230bf237805ff61a0c (patch)
treec34ab2b1d1b83e233726db2211a6f4e74f779892 /app/javascript/packs
parent4f6af87906175d9ea802ef0c6f050388eac890fa (diff)
Fix eslint error of import/no-extraneous-dependencies (#11884)
* Fix eslint error of import/no-extraneous-dependencies
- Add history dependency

* refactoring code
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/public.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index c5cd7129f..97ee4dfa2 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -31,10 +31,10 @@ function main() {
   const React = require('react');
   const ReactDOM = require('react-dom');
   const Rellax = require('rellax');
-  const createHistory = require('history').createBrowserHistory;
+  const { createBrowserHistory } = require('history');
 
   const scrollToDetailedStatus = () => {
-    const history = createHistory();
+    const history = createBrowserHistory();
     const detailedStatuses = document.querySelectorAll('.public-layout .detailed-status');
     const location = history.location;