Skip to content

Commit 122c6db

Browse files
committed
fix(deployment): fix type def for tripPlannerVersion
1 parent ffeaee8 commit 122c6db

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

lib/manager/components/deployment/DeploymentConfigurationsPanel.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ export default class DeploymentConfigurationsPanel extends Component<{
163163
render () {
164164
const { deployment, updateDeployment } = this.props
165165
const { customFileEditIdx, otp: options } = this.state
166-
const isOtp = deployment.tripPlannerVersion.startsWith('OTP_')
167-
168166
return (
169167
<Panel header={<h3><Icon type='cog' /> OTP Configuration</h3>}>
170168
<ListGroup fill>
@@ -182,17 +180,15 @@ export default class DeploymentConfigurationsPanel extends Component<{
182180
onChange={this._onUpdateTripPlannerVersion}
183181
options={TRIP_PLANNER_VERSIONS}
184182
/>
185-
{isOtp && (
186-
<div>
187-
OTP jar file
188-
<Select
189-
clearable={false}
190-
value={deployment.otpVersion}
191-
onChange={this._onUpdateVersion}
192-
options={options ? options.map(v => ({value: v, label: v})) : []}
193-
/>
194-
</div>
195-
)}
183+
<div>
184+
OTP jar file
185+
<Select
186+
clearable={false}
187+
value={deployment.otpVersion}
188+
onChange={this._onUpdateVersion}
189+
options={options ? options.map(v => ({value: v, label: v})) : []}
190+
/>
191+
</div>
196192
</ListGroupItem>
197193
<ListGroupItem>
198194
Deploying to the{' '}

lib/types/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export type Deployment = {
247247
projectId: string,
248248
routerId: ?string,
249249
skipOsmExtract: boolean,
250-
tripPlannerVersion: 'OTP_1' | 'OTP_2',
250+
tripPlannerVersion?: 'OTP_1' | 'OTP_2',
251251
user: ?any // TODO add more specific type
252252
}
253253

0 commit comments

Comments
 (0)