Skip to content

Commit

Permalink
//ize pathExists
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Feb 18, 2022
1 parent 3c45615 commit 4801241
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/addon-dev/src/rollup-hbs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ async function isTemplateOnly(hbsPath: string) {
let jsPath = hbsPath.replace(/\.hbs$/, '.js');
let tsPath = hbsPath.replace(/\.hbs$/, '.ts');

let hasJs = await pathExists(jsPath);
let hasTs = await pathExists(tsPath);
let [hasJs, hasTs] = await Promise.all([
pathExists(jsPath),
pathExists(tsPath),
]);

let hasClass = hasJs || hasTs;

Expand Down

0 comments on commit 4801241

Please sign in to comment.