Skip to content

Commit 07f4290

Browse files
committed
Debugging attempt of canClaim.
1 parent a5aa988 commit 07f4290

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/lib/AlertBuilder/AlertBuilder.js

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class AlertBuilder {
8787

8888
// output all collected alerts
8989
getAlerts() {
90+
console.log("Alerts:");
91+
console.log(JSON.stringify(this.alerts, null, 2));
9092
return this.alerts;
9193
}
9294
}

src/views/Records/Record.vue

+9-6
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export default {
422422
/* istanbul ignore if */
423423
if (this.currentRecord.fairsharingRecord.doi) {
424424
citeAsUrl = "https://doi.org/" + this.currentRecord.fairsharingRecord.doi;
425-
describedByUrl = this.getHostname() + this.currentRecord.fairsharingRecord.doi.split(/\//)[1];
425+
describedByUrl = this.getHostname() + this.currentRecord.fairsharingRecord.doi.split(/\//)[1];
426426
}
427427
else {
428428
citeAsUrl = this.getHostname() + this.recordID;
@@ -933,7 +933,9 @@ export default {
933933
async checkClaimStatus() {
934934
let _module = this;
935935
if (_module.user().isLoggedIn) {
936-
const recordID = _module.currentRecord['fairsharingRecord'].id;
936+
//const recordID = _module.currentRecord['fairsharingRecord'].id;
937+
_module.canClaim = false;
938+
/*
937939
try {
938940
const claim = await client.canClaim(recordID, _module.user().credentials.token);
939941
if (claim.error) {
@@ -962,10 +964,11 @@ export default {
962964
_module.noClaimRegistered = true;
963965
}
964966
}
965-
catch (e) {
966-
/* istanbul ignore next */
967-
_module.canClaim = false;
968-
}
967+
*/
968+
//catch (e) {
969+
// /* istanbul ignore next */
970+
// _module.canClaim = false;
971+
//}
969972
}
970973
},
971974
/**

0 commit comments

Comments
 (0)