Skip to content

Commit 124ed85

Browse files
committed
fix: cannot read properties of undefined Error
1 parent e5a8479 commit 124ed85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/esbuild-plugin-copy/src/lib/handler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export function copyOperationHandler(
5050
// globbedFromPath: /PATH/TO/assets/nest/foo.js → /nest/foo.js
5151
const [, preservedDirStructure] = globbedFromPath.split(startFragment);
5252

53+
if (!preservedDirStructure) {
54+
continue;
55+
}
56+
5357
// /PATH/TO/assets/foo.js
5458
// path.resolve seems to be unnecessary as globbed path is already absolute path
5559
const sourcePath = path.resolve(globbedFromPath);

0 commit comments

Comments
 (0)