Skip to content

Commit 43f56b0

Browse files
committed
style: remove strange empty line
1 parent 5724048 commit 43f56b0

File tree

10 files changed

+0
-21
lines changed

10 files changed

+0
-21
lines changed

src/components/Base.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ class BaseRouterComponent extends PureComponent {
2020
}
2121

2222
componentWillUnmount() {
23-
2423
if (this.isSubscribed) {
2524
this.unsubscribe();
2625
delete this.unsubscribe;
2726
}
2827
}
2928

3029
get isSubscribed() {
31-
3230
return typeof this.unsubscribe === 'function';
3331
}
3432

src/components/Fragment.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { push as actionPush } from '../actions';
77
class Fragment extends BaseRouterComponent {
88

99
constructor(props, context) {
10-
1110
super(props, context);
1211

1312
const { id } = this.props;
@@ -19,7 +18,6 @@ class Fragment extends BaseRouterComponent {
1918
}
2019

2120
componentWillReceiveProps(newProps) {
22-
2321
const { redirect } = this.props;
2422
const newRedirect = newProps.redirect;
2523

@@ -31,14 +29,12 @@ class Fragment extends BaseRouterComponent {
3129
}
3230

3331
getChildContext() {
34-
3532
const { router } = this.context;
3633

3734
return { router: { ...router, current: this.current } };
3835
}
3936

4037
handleStoreChange(newProps) {
41-
4238
if (!this.isSubscribed) return;
4339

4440
const routerStore = this.getStatefromStore();
@@ -77,7 +73,6 @@ class Fragment extends BaseRouterComponent {
7773
}
7874

7975
render() {
80-
8176
const { visible, matchExact, redirect } = this.state;
8277
const { children, component: ChildComponent} = this.props;
8378

src/components/Link.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616

1717

1818
const compareQueryItems = (linkQueryItem, routeQueryItem) => {
19-
2019
linkQueryItem = [].concat(linkQueryItem);
2120
routeQueryItem = [].concat(routeQueryItem);
2221

@@ -28,7 +27,6 @@ const compareQueryItems = (linkQueryItem, routeQueryItem) => {
2827
};
2928

3029
function filterProps(props) {
31-
3230
const propsCopy = Object.assign({}, props);
3331

3432
const managedProps = [ 'to', 'activeClass', 'method', 'activeMatch' ];
@@ -43,7 +41,6 @@ function filterProps(props) {
4341
class Link extends BaseRouterComponent {
4442

4543
constructor(props, context) {
46-
4744
super(props, context);
4845

4946
this.handleClick = this.handleClick.bind(this);
@@ -55,7 +52,6 @@ class Link extends BaseRouterComponent {
5552
}
5653

5754
componentWillReceiveProps(newProps) {
58-
5955
if (this.props.to !== newProps.to) {
6056
this.href = this.getHref(newProps);
6157
}
@@ -71,7 +67,6 @@ class Link extends BaseRouterComponent {
7167
}
7268

7369
handleClick(e) {
74-
7570
const { onClick } = this.props;
7671

7772
if (typeof onClick === 'function') {
@@ -107,7 +102,6 @@ class Link extends BaseRouterComponent {
107102
}
108103

109104
handleStoreChange() {
110-
111105
if (!this.isSubscribed) return;
112106

113107
const { activeClass, activeMatch } = this.props;
@@ -166,7 +160,6 @@ class Link extends BaseRouterComponent {
166160
}
167161

168162
render() {
169-
170163
const { children, activeClass, className, target = null } = this.props;
171164
const classes = this.state.isActive ? `${className} ${activeClass}` : className;
172165

src/components/Provider.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { DEFAULT_SLICE, __DEV__ } from '../constants';
55

66
class Provider extends Component {
77
getChildContext() {
8-
98
const { immutable, slice, routes, current } = this.props;
109
const router = {
1110
immutable,

src/middleware.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { ACTION_PREFIX, ACTION_TYPES, HISTORY_METHODS} from './constants';
22
import { parsePath } from 'history';
33

44
export default ({ history, routeParser }) => ({ dispatch, getState }) => next => action => {
5-
65
if (action.type.indexOf(ACTION_PREFIX) === 0 && action.type !== ACTION_TYPES.LOCATION_CHANGED) {
76

87
if (action.type === ACTION_TYPES.GO_TO_ROUTE) {

src/parsers/locationToRoute.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const createParamsFromKeys = (match, keys) => keys.reduce((result, key, index) =
88
}, {});
99

1010
const createMatchPathToRoute = matchers => path => {
11-
1211
path = path.split('?');
1312
const pathname = path.shift();
1413
const pathQuery = qs.parse(path.shift());

src/parsers/routeToLocation.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const createMatchRouteToPath = registry => ({ id, params = {}, query = {}, hash
3636
};
3737

3838
const createRouteToLocationParser = routes => {
39-
4039
const registry = flattenRoutes(routes).reduce((result, item) => {
4140
if (result[item.id]) {
4241
return result;

src/parsers/util.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { join as pathJoin } from 'path';
22
import { __DEV__, ID_DELIM } from '../constants';
33

44
export const flattenRoutes = (routes, parentRoutePath = '', parentIdPath = '', parentData = {}) => {
5-
65
let result = [];
76

87
for (let route of routes) {

src/reducer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ACTION_TYPES } from './constants';
22

33
export default ({ locationParser, immutable }) => (state = immutable ? require('immutable').fromJS({}) : {}, { type, payload }) => {
4-
54
if (type === ACTION_TYPES.LOCATION_CHANGED) {
65

76
const result = locationParser(payload);

src/store-enhancer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const scrollToHash = hash => {
2121
};
2222

2323
export default ({ history, slice, locationParser, immutable }) => next => (reducer, initialState, enhancer) => {
24-
2524
// boilerplate
2625
if (typeof initialState === 'function' && typeof enhancer === 'undefined') {
2726
enhancer = initialState;

0 commit comments

Comments
 (0)