Skip to content

Commit a1f0b3a

Browse files
committed
undo toFileSystemPath changes
1 parent 6377871 commit a1f0b3a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/resolve-external.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ function crawl (obj, path, $refs, options, external, seen) {
7575
if (external && $Ref.is$Ref(obj)) {
7676
/* Correct the reference in the external document so we can resolve it */
7777
let withoutHash = url.stripHash(path);
78-
if (url.isFileSystemPath(withoutHash)) {
79-
/* remove file:// from path */
80-
withoutHash = url.toFileSystemPath(withoutHash);
78+
const isFileUrl = withoutHash.substr(0, 7).toLowerCase() === "file://";
79+
if (isFileUrl) {
80+
// Strip-off the protocol
81+
withoutHash = withoutHash.substr(7);
8182
}
8283
obj.$ref = withoutHash + obj.$ref;
8384
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stoplight/json-schema-ref-parser",
3-
"version": "9.2.5",
3+
"version": "9.2.7",
44
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
55
"keywords": [
66
"json",

0 commit comments

Comments
 (0)