Skip to content

Commit

Permalink
refactor: remove unneeded var
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmace committed Feb 11, 2025
1 parent a5968d4 commit d9c2860
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/adp-tooling/src/preview/routes-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,7 @@ function generateControllerFile(rootPath: string, filePath: string, name: string

renderFile(tmplPath, templateData, {}, (err, str) => {
if (err) {
const templateType = isTsSupported ? 'TypeScript' : 'JavaScript';
throw new Error(`Error rendering ${templateType} template: ${err.message}`);
throw new Error(`Error rendering ${isTsSupported ? 'TypeScript' : 'JavaScript'} template: ${err.message}`);
}

fs.writeFileSync(filePath, str, { encoding: 'utf8' });
Expand Down

0 comments on commit d9c2860

Please sign in to comment.