Skip to content

Commit

Permalink
[patch]Webpack reporter fixes (#682)
Browse files Browse the repository at this point in the history
* fix the webpack reporter reload issue

* fix selected tab issue after refreshing the page

* linter issues

* add break for default case
  • Loading branch information
didi0613 authored and jchip committed Jan 17, 2018
1 parent b7a708a commit 1840863
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class WebpackReporter extends EventEmitter {
}
app.get(RoutePaths.DATA, this._data.bind(this));
app.get(RoutePaths.STATS, this._stats.bind(this));
app.get(`${RoutePaths.BASE}/*`, this._webReport.bind(this));

if (!this.options.skipSocket) {
const io = SocketIO(this.options.socketPort);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import React from "react";
import styles from "../styles/base.css";
import {Link} from "react-router";
import RoutePaths from "../../../lib/route-paths";

class NavBar extends React.Component {
constructor(props) {
super(props);
this.state = {mode: "report"};

switch (window.location.pathname) {
case RoutePaths.LEGACY:
this.state = {mode: "legacy"};
break;
default:
this.state = {mode: "report"};
break;
}
}

createNavBarItem(item) {
Expand Down

0 comments on commit 1840863

Please sign in to comment.