Skip to content

Commit

Permalink
fix: Fix images path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Nov 6, 2024
1 parent c67580d commit f214db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getDepth(path: string) {
}

export function getDepthPath(path: string | number) {
const depth = typeof path === 'number' ? path : getDepth(path);
const depth = typeof path === 'number' ? path : getDepth(path) - 1;

return Array(depth).fill('../').join('') || './';
}

0 comments on commit f214db1

Please sign in to comment.