Skip to content

Commit

Permalink
Use $id in schema profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
keenangraham committed Feb 17, 2022
1 parent e5ee721 commit be15347
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/encoded/static/components/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const excludedTerms = [
'mixinProperties',
'title',
'description',
'id',
'$id',
'$schema',
'facets',
'columns',
Expand Down Expand Up @@ -588,7 +588,7 @@ const SchemaPage = (props) => {
const { title } = context;

// The schema id is a path to the schema's JSON. Convert that to just the schema name.
const schemaName = schemaIdToName(context.id);
const schemaName = schemaIdToName(context['$id']);

// Set up the "breadcrumbs" (sneer quotes because it's really just a link to /profiles/).
// If schemaName happened to be null (which it realistically can't), <BreadCrumbs> would
Expand Down Expand Up @@ -674,8 +674,8 @@ const AllSchemasPage = (props, reactContext) => {
// `objectName` is the @type of each objects e.g. GeneticModification
// `schemaName` is the system name of the objects e.g. genetic_modification
// `schemaPath` is the schema page path e.g. /profiles/genetic_modification
const schemaName = schemaIdToName(context[objectName].id);
const schemaPath = schemaIdToPage(context[objectName].id);
const schemaName = schemaIdToName(context[objectName]['$id']);
const schemaPath = schemaIdToPage(context[objectName]['$id']);

return (
<div className="schema-list__item" key={objectName}>
Expand Down

0 comments on commit be15347

Please sign in to comment.