Skip to content

Commit

Permalink
Fix @graph @container term @context handling.
Browse files Browse the repository at this point in the history
When a term scoped context is nullified, it also nullifies the container
information. This fix gets the `@container` value from the active
context. In particular, this is needed for proper `@graph` container
handling.
  • Loading branch information
davidlehn committed Dec 6, 2023
1 parent e2f6523 commit d5ad0d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# jsonld ChangeLog

## 8.3.2 - 2023-xx-xx

### Fixed
- Fix handling of a `@graph` `@container` term that has a `null` `@context`.

## 8.3.1 - 2023-09-06

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/expand.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ async function _expandObject({
});
}

const container = _getContextValue(termCtx, key, '@container') || [];
const container = _getContextValue(activeCtx, key, '@container') || [];

if(container.includes('@language') && _isObject(value)) {
const direction = _getContextValue(termCtx, key, '@direction');
Expand Down

0 comments on commit d5ad0d9

Please sign in to comment.