Skip to content

Commit

Permalink
Fix robots for ready for index users (#2012)
Browse files Browse the repository at this point in the history
* fix-robots-for-ready-for-index-users

* remove logs
  • Loading branch information
leomendoza123 authored Jul 11, 2023
1 parent 759412c commit b49bf4f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/app/record/pages/my-orcid/my-orcid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,14 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
this.userInfo = userRecord?.userInfo
this.checkLoadingState(userRecord)
this.recordWithIssues = userRecord?.userInfo?.RECORD_WITH_ISSUES
this.readyForIndexing =
userRecord?.userInfo?.READY_FOR_INDEXING === 'true'

if (userRecord?.userInfo) {
this.readyForIndexing =
userRecord?.userInfo?.READY_FOR_INDEXING === 'true'
if (this.publicOrcid && !this.readyForIndexing) {
this._robotsMeta.disallowRobots()
}
}

this.userNotFound = userRecord?.userInfo?.USER_NOT_FOUND
this.userRecord = userRecord
Expand All @@ -133,9 +139,6 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
this.observeSessionUpdates()
}

if (this.publicOrcid && !this.readyForIndexing) {
this._robotsMeta.disallowRobots()
}
this._openGraph.addOpenGraphData(userRecord, { force: true })
}),
switchMap(() => this._togglz.getTogglz().pipe(first())),
Expand Down

0 comments on commit b49bf4f

Please sign in to comment.