diff --git a/src/core/create_routes.ts b/src/core/create_routes.ts index 6215932..883f8d1 100644 --- a/src/core/create_routes.ts +++ b/src/core/create_routes.ts @@ -130,8 +130,8 @@ export default function create_routes(cwd = locations.routes()) { const is_branch = items.some(other_item => { if (other_item === item) return false; - if (item.is_dir) { - return fs.existsSync(path.join(dir, item.basename, 'index.html')); + if (other_item.is_dir) { + return fs.existsSync(path.join(dir, other_item.basename, 'index.html')); } return other_item.is_page;