Skip to content

Commit d011728

Browse files
gkelloggdavidlehn
authored andcommitted
Default frame for lists.
1 parent 7cf2f71 commit d011728

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- Better support for graph framing.
2121
- Better frame validation.
2222
- Wildcard matching on `@id` and other `requireAll` semantics.
23+
- Default frame for lists.
2324

2425
### Changed
2526
- Keep term definitions mapping to null so they may be protected.

lib/frame.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ api.frame = (state, subjects, frame, parent, property = null) => {
235235
// recurse into list
236236
if(graphTypes.isList(o)) {
237237
const subframe = (frame[prop] && types.isObject(frame[prop][0]) ?
238-
frame[prop][0]['@list'] : _createImplicitFrame(flags));
238+
(frame[prop][0]['@list'] || _createImplicitFrame(flags)) :
239+
_createImplicitFrame(flags));
239240

240241
// add empty list
241242
const list = {'@list': []};

tests/test-common.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ const TEST_TYPES = {
127127
// FIXME
128128
idRegex: [
129129
// lists
130-
/frame-manifest.jsonld#t0055$/,
131130
/frame-manifest.jsonld#t0058$/,
132131
// included
133132
/frame-manifest.jsonld#tin01$/,

0 commit comments

Comments
 (0)