Skip to content

Commit 66d333e

Browse files
committed
Use dot notation
1 parent 3599ebb commit 66d333e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/encoded/static/components/schema.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ const SchemaPage = (props) => {
588588
const { title } = context;
589589

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

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

680680
return (
681681
<div className="schema-list__item" key={objectName}>

0 commit comments

Comments
 (0)