Make email theme initialization work with theme-only projects

This commit is contained in:
garronej
2023-03-25 04:20:10 +01:00
parent 88fe99b1b8
commit f4f7ab3e49

View File

@ -28,6 +28,14 @@ function getThemeSrcDirPath() {
return pathJoin(srcDirPath, split[0] + themeSrcDirBasename); return pathJoin(srcDirPath, split[0] + themeSrcDirBasename);
}) })
.filter(exclude(undefined))[0]; .filter(exclude(undefined))[0];
if (themeSrcDirBasename === undefined) {
if (!fs.existsSync(pathJoin(srcDirPath, "kcContext.ts"))) {
return { "themeSrcDirPath": undefined };
}
return { "themeSrcDirPath": srcDirPath };
}
return { themeSrcDirPath }; return { themeSrcDirPath };
} }