File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1414- Terms of the form of a relative IRI may not be used as prefixes.
1515- Match spec error code "invalid context entry" vs "invalid context member".
1616- Keywords may not be used as prefixes.
17+ - Handle term definition on ` @type ` with empty map.
1718
1819### Changed
1920- Keep term definitions mapping to null so they may be protected.
Original file line number Diff line number Diff line change @@ -411,7 +411,8 @@ api.createTermDefinition = ({
411411 api . processingMode ( activeCtx , 1.1 ) ) {
412412
413413 const validKeys = [ '@container' , '@id' , '@protected' ] ;
414- if ( Object . keys ( value ) . some ( k => ! validKeys . includes ( k ) ) ) {
414+ const keys = Object . keys ( value ) ;
415+ if ( keys . length === 0 || keys . some ( k => ! validKeys . includes ( k ) ) ) {
415416 throw new JsonLdError (
416417 'Invalid JSON-LD syntax; keywords cannot be overridden.' ,
417418 'jsonld.SyntaxError' ,
You can’t perform that action at this time.
0 commit comments