refactor: remove redundant initialization
This commit is contained in:
parent
237ae2079c
commit
5d84985551
|
@ -7,7 +7,7 @@ function compile(isDevMode = false) {
|
||||||
const templatePath = path.resolve(__dirname, 'index.html.handlebars');
|
const templatePath = path.resolve(__dirname, 'index.html.handlebars');
|
||||||
const template = fs.readFileSync(templatePath).toString();
|
const template = fs.readFileSync(templatePath).toString();
|
||||||
const compiled = handlebars.compile(template);
|
const compiled = handlebars.compile(template);
|
||||||
let result = '';
|
let result;
|
||||||
if (isDevMode) {
|
if (isDevMode) {
|
||||||
result = compiled(data.dev);
|
result = compiled(data.dev);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue