Skip to content

Commit 52f3d6e

Browse files
committed
fix(validation): fix check for fatal exception on validation result
1 parent fc1face commit 52f3d6e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/manager/components/validation/GtfsValidationSummary.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export class ValidationSummaryTable extends Component {
5555
const {
5656
version
5757
} = this.props
58+
// FIXME NPE on validationresult error_counts?
5859
if (version && version.validationResult && version.validationResult.error_counts.length === 0) {
5960
return <div className='lead text-center '>No validation issues found.</div>
6061
} else if (!version || !version.validationResult) {

lib/manager/components/version/FeedVersionViewer.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,15 @@ class VersionSectionSelector extends Component {
199199

200200
_renderIssuesLabel (version) {
201201
const tableFatalExceptions = getTableFatalExceptions(version)
202-
const hasCriticalError = version.validationSummary.loadStatus !== 'SUCCESS' ||
203-
version.feedLoadResult.fatalException || tableFatalExceptions.length > 0
202+
const {validationSummary, feedLoadResult} = version
203+
const hasCriticalError = validationSummary.loadStatus !== 'SUCCESS' ||
204+
!feedLoadResult || feedLoadResult.fatalException ||
205+
tableFatalExceptions.length > 0
204206
const color = this.props.validationJob
205207
? 'warning'
206208
: hasCriticalError
207209
? 'danger'
208-
: version.validationSummary.errorCount
210+
: validationSummary.errorCount
209211
? 'warning'
210212
: 'success'
211213
const text = this.props.validationJob

0 commit comments

Comments
 (0)