Skip to content

Commit 0a2b190

Browse files
gkelloggdavidlehn
authored andcommitted
Make suggested changes.
1 parent 11f2936 commit 0a2b190

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/compact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ api.compactIri = ({
649649
for(let i = partialMatches.length - 1; i >= 0; --i) {
650650
const entry = partialMatches[i];
651651
const terms = entry.terms;
652-
for(let term of terms) {
652+
for(const term of terms) {
653653
// a CURIE is usable if:
654654
// 1. it has no mapping, OR
655655
// 2. value is null, which means we're not compacting an @value, AND

lib/context.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ api.createTermDefinition = (activeCtx, localCtx, term, defined) => {
492492
'jsonld.SyntaxError',
493493
{code: 'invalid term definition', context: localCtx});
494494
}
495-
if(value['@prefix'] === true || value['@prefix'] === false) {
496-
mapping._prefix = value['@prefix'] === true
495+
if(typeof value['@prefix'] === 'boolean') {
496+
mapping._prefix = value['@prefix'] === true;
497497
} else {
498498
throw new JsonLdError(
499499
'Invalid JSON-LD syntax; @context value for @prefix must be boolean',

0 commit comments

Comments
 (0)