Skip to content

Commit 7f22bd5

Browse files
committed
Fix for Merge Node Maps algorithm.
- Exclude `@type` from added values in Merge Node Maps step 2.2.1. - Fix for w3c/json-ld-api#407.
1 parent 5637f34 commit 7f22bd5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# jsonld ChangeLog
22

3+
### Fixed
4+
- Exclude `@type` from added values in Merge Node Maps step 2.2.1.
5+
36
## 3.0.0 - 2020-03-10
47

58
### Notes

lib/nodeMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ api.mergeNodeMapGraphs = graphs => {
241241
const mergedNode = merged[id];
242242

243243
for(const property of Object.keys(node).sort()) {
244-
if(isKeyword(property)) {
244+
if(isKeyword(property) && property !== '@type') {
245245
// copy keywords
246246
mergedNode[property] = util.clone(node[property]);
247247
} else {

0 commit comments

Comments
 (0)