Skip to content

Commit

Permalink
Merge pull request #124 from seriousme/refactor-resolve
Browse files Browse the repository at this point in the history
refactor resolve
  • Loading branch information
seriousme authored Nov 16, 2023
2 parents de4b7e0 + d52d843 commit cbc9c1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ function resolve(tree, replace) {
for (const prop in obj) {
if (pointerWords.has(prop)) {
pointers[prop].push({ ref: obj[prop], obj, prop, path, id: objId });
if (replace) {
delete obj[prop];
}
delete obj[prop];
}
parse(obj[prop], `${path}/${escapeJsonPointer(prop)}`, objId);
}
Expand Down

0 comments on commit cbc9c1a

Please sign in to comment.