Skip to content

Commit

Permalink
Merge pull request #16 from triyanox/fix/remove-empty-path
Browse files Browse the repository at this point in the history
Fix/remove empty path
  • Loading branch information
chaqchase authored Mar 25, 2024
2 parents 0755339 + 5ac8ac4 commit 07db107
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @triyanox/next-routes

## 0.1.4

### Patch Changes

- Remove empty path from generated routes

## 0.1.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@triyanox/next-routes",
"description": "You will never have broken links in your Next.js app again",
"version": "0.1.3",
"version": "0.1.4",
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ const generateRoutes = async (appDir: string): Promise<IRoute[]> => {
.map((route) => ({
...route,
path: cleanPath(route.path, appDir),
}));
}))
.filter((route) => route.path !== '');

routes_generated.push({
path: '/',
Expand Down

0 comments on commit 07db107

Please sign in to comment.