diff --git a/resolve.js b/resolve.js index 03ab3e5..28006d2 100644 --- a/resolve.js +++ b/resolve.js @@ -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); }