From 026531ab371b915c1d23494f451194bf725919bc Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Sat, 19 Oct 2024 00:01:45 +0900 Subject: [PATCH] Fix runtime error caused by unexpected undefined in path.resolve Signed-off-by: Sora Morimoto --- src/templates-worker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/templates-worker.ts b/src/templates-worker.ts index 98888ccdd..6d870fa52 100644 --- a/src/templates-worker.ts +++ b/src/templates-worker.ts @@ -38,7 +38,8 @@ export class TemplatesWorker { const originalTemplatesPath = config.modular ? modularTemplatesPath : defaultTemplatesPath; - const customTemplatesPath = path.resolve(process.cwd(), config.templates); + const customTemplatesPath = + config.templates && path.resolve(process.cwd(), config.templates); return { /** `templates/base` */