Skip to content

Commit fcbe90c

Browse files
committed
Fix @json frame test 0069.
1 parent 6f221e9 commit fcbe90c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
### Fixed
2222
- Improve safe mode for `@graph` use cases.
23+
- Fix `@json` frame test 0069.
2324

2425
## 8.1.1 - 2023-02-25
2526

Diff for: lib/frame.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,9 @@ function _validateFrame(frame) {
464464

465465
if('@type' in frame[0]) {
466466
for(const type of util.asArray(frame[0]['@type'])) {
467-
// @id must be wildcard or an IRI
468-
if(!(types.isObject(type) || url.isAbsolute(type)) ||
467+
// @type must be wildcard, IRI, or @json
468+
if(!(types.isObject(type) || url.isAbsolute(type) ||
469+
(type === '@json')) ||
469470
(types.isString(type) && type.indexOf('_:') === 0)) {
470471
throw new JsonLdError(
471472
'Invalid JSON-LD syntax; invalid @type in frame.',

Diff for: tests/test.js

-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ const TEST_TYPES = {
247247
// NOTE: idRegex format:
248248
//MMM-manifest#tNNN$/,
249249
idRegex: [
250-
/frame-manifest#t0069$/,
251250
]
252251
},
253252
fn: 'frame',

0 commit comments

Comments
 (0)