Skip to content

Commit cabeff1

Browse files
authored
Merge pull request #959 from acacode/fix-path-resolve-error
Fix runtime error caused by unexpected undefined in path.resolve
2 parents e1963a0 + 026531a commit cabeff1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/templates-worker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export class TemplatesWorker {
3838
const originalTemplatesPath = config.modular
3939
? modularTemplatesPath
4040
: defaultTemplatesPath;
41-
const customTemplatesPath = path.resolve(process.cwd(), config.templates);
41+
const customTemplatesPath =
42+
config.templates && path.resolve(process.cwd(), config.templates);
4243

4344
return {
4445
/** `templates/base` */

0 commit comments

Comments
 (0)