Skip to content

Commit

Permalink
Fix preloading path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgarde committed Aug 7, 2023
1 parent 39c20fd commit 0bc4cef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export default class Utilities {
* cross-reference use of schemas via ajv's resolution
*/
async #preloadSchemas() {
const schemaDir = await fs.opendir('../schemas');
const schemaPath = path.resolve(
import.meta.url.replace(/^file:/, ''),
'../../schemas',
);
const schemaDir = await fs.opendir(schemaPath);
for await (const entry of schemaDir) {
if (!entry.isFile()) {
continue;
Expand Down

0 comments on commit 0bc4cef

Please sign in to comment.