Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
scitran.getProject(snapshotId, (res) => {
for (let app of this.props.apps) {
let longDescription = typeof(app.longDescription) == 'string' ? JSON.parse(app.longDescription) : app.longDescription;
let appConfig = longDescription.hasOwnProperty('appConfig') ? longDescription.appConfig : {error: []};
let issues = validate.reformat(res.body.metadata.validation, res.body.metadata.summary, appConfig);
if (issues.errors.length > 0) {
disabledApps[app.id] = {issues};
}
}
this.setState({selectedSnapshot: snapshotId, disabledApps});
},{snapshot:true});
}