From 4ffd1e94e49740b9565378a63986fe9b6b6214c4 Mon Sep 17 00:00:00 2001 From: William Wong Date: Wed, 6 Sep 2023 23:27:42 -0700 Subject: [PATCH] Fix @context --- src/app/data/sampleActivity.ts | 10 +++++----- src/app/types/SchemaOrg/Thing.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/data/sampleActivity.ts b/src/app/data/sampleActivity.ts index b518507..f1bc87a 100644 --- a/src/app/data/sampleActivity.ts +++ b/src/app/data/sampleActivity.ts @@ -11,7 +11,7 @@ export default { `, entities: [ { - '@context': 'https://schema.org/', + '@context': 'https://schema.org', '@id': 'cite:1', '@type': 'Claim', name: 'Sample Citation From File', @@ -77,14 +77,14 @@ Configuring Proxy Auto-Discovery (PAD) proxy settings is a vital task for networ ` }, { - '@context': 'https://schema.org/', + '@context': 'https://schema.org', '@id': 'cite:2', '@type': 'Claim', type: 'https://schema.org/Claim', text: 'Here is some plain text without any Markdown formatting in it.' }, { - '@context': 'https://schema.org/', + '@context': 'https://schema.org', '@type': 'ReplyAction', type: 'https://schema.org/ReplyAction', @@ -97,14 +97,14 @@ Configuring Proxy Auto-Discovery (PAD) proxy settings is a vital task for networ } }, { - '@context': 'https://schema.org/', + '@context': 'https://schema.org', '@type': 'VoteAction', type: 'https://schema.org/VoteAction', actionOption: 'upvote' }, { - '@context': 'https://schema.org/', + '@context': 'https://schema.org', '@type': 'VoteAction', type: 'https://schema.org/VoteAction', diff --git a/src/app/types/SchemaOrg/Thing.ts b/src/app/types/SchemaOrg/Thing.ts index ac1bdf5..e723321 100644 --- a/src/app/types/SchemaOrg/Thing.ts +++ b/src/app/types/SchemaOrg/Thing.ts @@ -4,7 +4,7 @@ * This is partial type of https://schema.org/Thing. */ export type Thing = { - '@context': 'https://schema.org/'; + '@context': 'https://schema.org'; '@id'?: string; '@type': T; type: `https://schema.org/${T}`; @@ -23,6 +23,6 @@ export function isThing(entity: { type: string }): entity is Thing { export function isThingOf(thing: Thing, type: T): thing is Thing { return ( thing.type === `https://schema.org/${type}` || - (thing['@context'] === 'https://schema.org/' && thing['@type'] === type) + (thing['@context'] === 'https://schema.org' && thing['@type'] === type) ); }