Skip to content

Commit

Permalink
added error handling for no data from RCSB and updated bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatbhargava123 committed Oct 12, 2019
1 parent 920c75f commit 843fcfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/RootContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ class RootContainer extends React.Component {
pv.io.fetchPdb(
`https://files.rcsb.org/download/${ids[selectedId]}.pdb`,
structure => {
if (!structure)
return this.setState({
error: 'No results found in RCSB Protein Data Bank'
});
this.setState({ structureReady: true }, () => {
// remove all current HTML from main element
// initialise protein visualizer with default init options
Expand Down

0 comments on commit 843fcfc

Please sign in to comment.