Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
refacotr: update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenyong committed Oct 19, 2023
1 parent 936952a commit cf2a558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dereference.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function crawl(obj, path, pathFromRoot, parents, processedObjects, dereferencedC
const keyPathFromRoot = Pointer.join(pathFromRoot, key);
const value = obj[key];

if (value?.$ref?.substring(0, 11) === '#components') {
if (value?.$ref?.substring(0, 2) !== '#/') {
throw new InvalidPointerError(value.$ref, keyPath);
}

Expand Down

0 comments on commit cf2a558

Please sign in to comment.