Skip to content

Commit

Permalink
fix(utils/tar): index access while match is null (#7555)
Browse files Browse the repository at this point in the history
  • Loading branch information
NormanPerrin committed May 24, 2024
1 parent 9122fb6 commit ac7f8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/tar.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const getContents = async (manifest, tarball) => {
totalEntries++
totalEntrySize += entry.size
const p = entry.path
if (p.startsWith('package/node_modules/')) {
if (p.startsWith('package/node_modules/') && p !== 'package/node_modules/') {
const name = p.match(/^package\/node_modules\/((?:@[^/]+\/)?[^/]+)/)[1]
bundled.add(name)
}
Expand Down

0 comments on commit ac7f8db

Please sign in to comment.