Skip to content

Commit

Permalink
fix: path separator on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ggurkal committed Oct 20, 2022
1 parent 6258d15 commit 89cf473
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/internals/getCallerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ export function getCallerInfo(): [directoryPath: string | undefined, fileName: s

const fileName = fileInfo[0].trim().split('/pages/api/');

return [join('/pages/api', dirname(fileName[fileName.length - 1])), basename(fileName[fileName.length - 1])];
return [
join('/pages/api', dirname(fileName[fileName.length - 1])).replace(/\\/g, '/'),
basename(fileName[fileName.length - 1])
];
}

0 comments on commit 89cf473

Please sign in to comment.