summaryrefslogtreecommitdiff
path: root/scraper
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-04-02 19:38:55 +0200
committerJules Laplace <julescarbon@gmail.com>2019-04-02 19:38:55 +0200
commitee2fa8546b9620c156bbb36d5131a2369950629e (patch)
treeee8418c18410b65c26055803afbc61a489bd00e3 /scraper
parent78f15af7ac4b336c5e53178fd80e348151cc5f98 (diff)
fix
Diffstat (limited to 'scraper')
-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)