diff --git a/src/components/molecule.js b/src/components/molecule.js
index 09fc17c..52d6499 100644
--- a/src/components/molecule.js
+++ b/src/components/molecule.js
@@ -76,10 +76,9 @@ class Molecule extends Component {
}
formatLink = (props) => {
- if (!isNil(props.name)) {
- return {props.name}
- }
- return Wikipedia Page
+ return
+ {!isNil(props.name) ? props.name : 'Wikipedia Page'}
+
}
render = () => {
@@ -102,12 +101,10 @@ class Molecule extends Component {
if (has(molecule, 'smiles')) {
moleculeProperties.push({label: 'SMILES', value: molecule.smiles});
}
- if (has(molecule, 'properties.wikipediaUrl')) {
+ if (has(molecule, 'wikipediaUrl')) {
moleculeProperties.push({
label: 'Wikipedia',
- value:
- {isNil(molecule.name) ? molecule.properties.wikipediaUrl : molecule.name}
-
+ value: this.formatLink(molecule)
});
}