Skip to content

Commit

Permalink
fix: update function to respect nodejs spec
Browse files Browse the repository at this point in the history
  • Loading branch information
seia-soto committed Aug 7, 2024
1 parent ba96754 commit feac9ea
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/converters/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ function getPathDirname(path) {
if (lastIndex === -1) {
return '.';
}
const lastOfLastIndex = path.lastIndexOf('/', lastIndex - 1);
if (lastOfLastIndex === -1) {
return path.slice(0, lastIndex);
}
if (lastOfLastIndex + 1 >= lastIndex) {
return '/';
}
return path.slice(lastOfLastIndex + 1, lastIndex);
return path.slice(0, lastIndex);
}

const allowedResourceExtensions = [
Expand Down

0 comments on commit feac9ea

Please sign in to comment.