Skip to content

Commit 29e85ca

Browse files
committed
Fix protected redefinition of equivalent id terms.
- Fix test `pr41` of protected redefinition of equivalent id terms. - The `String.match` logic and expression like `(true && null)` was evaluating to `null` which later failed a strict comparison with `false`. Fixed by forcing boolean logic.
1 parent 9802161 commit 29e85ca

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Fix handling of graph property with empty array.
77
- Fix safe mode for `@graph` use cases.
88
- Check all elements of graph property with array.
9+
- Fix test `pr41` of protected redefinition of equivalent id terms.
910

1011
## 8.2.0 - 2023-05-19
1112

lib/context.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ api.createTermDefinition = ({
708708
// indicate if this term may be used as a compact IRI prefix
709709
mapping._prefix = (simpleTerm &&
710710
!mapping._termHasColon &&
711-
id.match(/[:\/\?#\[\]@]$/));
711+
id.match(/[:\/\?#\[\]@]$/) !== null);
712712
}
713713
}
714714

0 commit comments

Comments
 (0)