summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scraper/client/paper/paper.verify.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js
index 8794feb4..813abb6d 100644
--- a/scraper/client/paper/paper.verify.js
+++ b/scraper/client/paper/paper.verify.js
@@ -36,7 +36,9 @@ class PaperVerify extends Component {
const { sha256 } = this.props.match.params
this.props.actions.getInstitutions()
this.props.actions.getAddress(sha256)
- this.props.actions.getVerification(this.props.api.paperInfo.dataset.key, sha256)
+ if (this.props.api.paperInfo.dataset) {
+ this.props.actions.getVerification(this.props.api.paperInfo.dataset.key, sha256)
+ }
const citationState = this.getCitationState(sha256)
// console.log('DID MOUNT')
this.setState(citationState)
@@ -51,6 +53,10 @@ class PaperVerify extends Component {
const paper = verify ? verify.paper : null
let newState = {}
+ if (this.props.api.paperInfo.dataset !== oldProps.api.paperInfo.dataset) {
+ this.props.actions.getVerification(this.props.api.paperInfo.dataset.key, sha256)
+ }
+
if (oldSha256 && sha256 !== oldSha256) {
// console.log('update verification')
this.props.actions.getAddress(sha256)