Skip to content

Commit

Permalink
Merge pull request #429 from EBISPOT/issue-426
Browse files Browse the repository at this point in the history
issue-426: make sure variables are string before doing substring
  • Loading branch information
serjoshua authored Jul 24, 2023
2 parents 3ce067b + 51b6416 commit 23e961a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Content-Length: 153
>
Hypertext Application Language (HAL)
</a>
format. Links can be found beneath the&thinsp;
&thinsp;format. Links can be found beneath the&thinsp;
<span className="text-code">_links</span> key. Users of the API should
not create URIs themselves, instead they should use the
above-described links to navigate from resource to resource.
Expand Down Expand Up @@ -412,8 +412,8 @@ Content-Type: application/json
<div className="text-lg text-petrol-600 my-3">Response structure</div>
<p className="mb-2">
The response is paginated where the individual ontology resources are
in the&thinsp;<span className="text-code">_embedded.ontologies</span>{" "}
field.
in the&thinsp;<span className="text-code">_embedded.ontologies</span>
&thinsp;field.
</p>
<div className="text-xl text-petrol-600 font-bold my-3">Ontology</div>
<div className="text-xl italic my-3">Retrieve an ontology</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function EntityAnnotationsSection({
return (
<li
key={
annotation.value.substring(0, 10) + randomString()
annotation.value.toString().substring(0, 10) + randomString()
}
>
<span>{renderAnnotation(annotation)}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function EntityDescriptionSection({
{desc.map((definition: Reified<any>, i: number) => {
return (
<p
key={definition.value.substring(0, 10) + randomString()}
key={definition.value.toString().substring(0, 10) + randomString()}
className="pb-3"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function EntityRelatedFromSection({
{predicates.map((p) => {
let label = linkedEntities.getLabelForIri(p);
return (
<div key={p + randomString()}>
<div key={p.toString() + randomString()}>
<div>
<i>{label || p}</i>
</div>
Expand All @@ -44,7 +44,7 @@ export default function EntityRelatedFromSection({
let relatedIri = relatedFrom.value.value;
// let label = linkedEntities.getLabelForIri(relatedIri);
return (
<li key={relatedIri + randomString()}>
<li key={relatedIri.toString() + randomString()}>
<EntityLink
ontologyId={entity.getOntologyId()}
currentEntity={entity}
Expand Down

0 comments on commit 23e961a

Please sign in to comment.