Skip to content

Commit

Permalink
fix: simplify code a bit where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ committed Mar 12, 2024
1 parent f1f95e5 commit b3eae12
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.ts
Expand Up @@ -274,13 +274,12 @@ export default function traverse(
return mutableSchema;
} else {
const isCycle = cycleSet.indexOf(schema) !== -1
const mutated = mutation(
mutableStack.pop();
return mutation(
mutableSchema,
isCycle,
jsonPathStringify(pathStack),
last(mutableStack, 2)
last(mutableStack)
);
mutableStack.pop();
return mutated;
}
}

0 comments on commit b3eae12

Please sign in to comment.