Skip to content

Commit da0221c

Browse files
committed
BusLine: Fix eslint warning
Signed-off-by: Kristofer Rye <[email protected]> Tested-by: Kristofer Rye <[email protected]>
1 parent 8a0ed08 commit da0221c

File tree

1 file changed

+2
-2
lines changed
  • source/views/transportation/bus

1 file changed

+2
-2
lines changed

source/views/transportation/bus/line.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ function deriveFromProps({line, now}: Props) {
119119
}
120120

121121
export class BusLine extends React.Component<Props, State> {
122+
state = deriveFromProps(this.props)
123+
122124
static getDerivedStateFromProps(nextProps: Props) {
123125
return deriveFromProps(nextProps)
124126
}
125127

126-
state = deriveFromProps(this.props)
127-
128128
shouldComponentUpdate(nextProps: Props) {
129129
return (
130130
this.props.now.isSame(nextProps.now, 'minute') ||

0 commit comments

Comments
 (0)