File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1010 defaults to ` @id ` .
1111- Expanding/compacting type scoped contexts uses context before applying
1212 new versions to look for type scopes.
13- -
1413
1514### Changed
1615- Default processing mode changed to json-ld-1.1. Allows a 1.1 context to be
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ api.compact = async ({
163163 const inputCtx = activeCtx ;
164164
165165 // revert to previous context, if there is one,
166- // and element is not a value object or a node reference
166+ // and element is not a value object or a node reference
167167 if ( ! _isValue ( element ) && ! _isSubjectReference ( element ) ) {
168168 activeCtx = activeCtx . revertToPreviousContext ( ) ;
169169 }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ api.process = async ({
6666 }
6767
6868 // override propagate if localCtx has `@propagate`
69- if ( _isObject ( ctxs [ 0 ] ) && '@propagate' in ctxs [ 0 ] ) {
69+ if ( _isObject ( ctxs [ 0 ] ) && typeof ctxs [ 0 ] [ '@propagate' ] === 'boolean' ) {
7070 // Retrieve early, error checking done later
7171 propagate = ctxs [ 0 ] [ '@propagate' ] ;
7272 }
@@ -90,7 +90,7 @@ api.process = async ({
9090 // reset to initial context
9191 if ( ctx === null ) {
9292 // We can't nullify if there are protected terms and we're
93- // not processing a property term scoped context
93+ // not allowing overrides (e.g. processing a property term scoped context)
9494 if ( ! overrideProtected &&
9595 Object . keys ( activeCtx . protected ) . length !== 0 ) {
9696 const protectedMode = ( options && options . protectedMode ) || 'error' ;
@@ -259,7 +259,7 @@ api.process = async ({
259259 }
260260 if ( typeof value !== 'boolean' ) {
261261 throw new JsonLdError (
262- 'Invalid JSON-LD syntax; @propagate must be boolean valued ' ,
262+ 'Invalid JSON-LD syntax; @propagate value must be a boolean. ' ,
263263 'jsonld.SyntaxError' ,
264264 { code : 'invalid @propagate value' , context : localCtx } ) ;
265265 }
@@ -279,7 +279,8 @@ api.process = async ({
279279 term : key ,
280280 defined,
281281 options,
282- overrideProtected} ) ;
282+ overrideProtected
283+ } ) ;
283284 }
284285
285286 // cache result
You can’t perform that action at this time.
0 commit comments