Only format moduleVar if moduleId exists
Signed-off-by: Min Kim <minkimcello@gmail.com>
This commit is contained in:
@@ -73,9 +73,11 @@ export default async () => {
|
||||
plugin: template.plugin ?? true,
|
||||
});
|
||||
|
||||
const moduleVar = `${camelCase(options.id)}Module${camelCase(
|
||||
options.moduleId,
|
||||
)[0].toUpperCase()}${camelCase(options.moduleId).slice(1)}`; // used in default-backend-module template
|
||||
const moduleVar =
|
||||
options.moduleId ??
|
||||
`${camelCase(options.id)}Module${camelCase(
|
||||
options.moduleId,
|
||||
)[0].toUpperCase()}${camelCase(options.moduleId).slice(1)}`; // used in default-backend-module template
|
||||
const extension = `${upperFirst(camelCase(options.id))}Page`; // used in default-plugin template
|
||||
const pluginVar = `${camelCase(options.id)}Plugin`; // used in default-backend-plugin and default-plugin template
|
||||
|
||||
|
||||
Reference in New Issue
Block a user