typebox 1.0.56 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,7 @@ export class Stack {
|
|
|
15
15
|
// Base
|
|
16
16
|
// ----------------------------------------------------------------
|
|
17
17
|
BaseURL() {
|
|
18
|
-
return this.ids.reduce((result, schema) => new URL(schema.$id, result), new URL('
|
|
18
|
+
return this.ids.reduce((result, schema) => new URL(schema.$id, result), new URL('http://unknown'));
|
|
19
19
|
}
|
|
20
20
|
Base() {
|
|
21
21
|
return this.ids[this.ids.length - 1] ?? this.schema;
|
|
@@ -89,7 +89,7 @@ function FromValue(schema, base, ref) {
|
|
|
89
89
|
// Ref
|
|
90
90
|
// ------------------------------------------------------------------
|
|
91
91
|
export function Ref(schema, ref) {
|
|
92
|
-
const defaultBase = new URL('
|
|
92
|
+
const defaultBase = new URL('http://unknown');
|
|
93
93
|
const initialBase = Schema.IsId(schema) ? new URL(schema.$id, defaultBase.href) : defaultBase;
|
|
94
94
|
const initialRef = new URL(ref, initialBase.href);
|
|
95
95
|
return FromValue(schema, initialBase, initialRef);
|