From e7239b5875c54c27f562d76c45fe3f1527597dd8 Mon Sep 17 00:00:00 2001 From: esemenov Date: Wed, 27 Dec 2023 14:46:04 +0600 Subject: [PATCH] fix: minor fix --- src/build/navigation.mjs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/build/navigation.mjs b/src/build/navigation.mjs index d4dc43fd..ed7eeb85 100644 --- a/src/build/navigation.mjs +++ b/src/build/navigation.mjs @@ -20,17 +20,8 @@ function buildNavSection(rawSection) { for (const item of rawSection.items) { if (typeof item === "string") { if (item.startsWith("policies/")) { - let schemaPath = path.resolve(path.join(item, `schema.json`)); - let schemaJson; - - if (fs.existsSync(schemaPath)) { - schemaJson = fs.readFileSync(schemaPath, "utf8"); - } else { - const itemPath = path.join(item.split("/")[1]); - - schemaPath = path.resolve("temp", itemPath, `schema.json`); - schemaJson = fs.readFileSync(schemaPath, "utf8"); - } + const schemaPath = path.resolve(path.join(item, `schema.json`)); + const schemaJson = fs.readFileSync(schemaPath, "utf8"); const schema = JSON.parse(schemaJson); section.items.push({