Skip to content

Commit

Permalink
inline the embedFiles function
Browse files Browse the repository at this point in the history
  • Loading branch information
jperezlatimes committed Nov 6, 2024
1 parent 8935d1b commit 3bd4a8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export class Baker extends EventEmitter {
* An array of file paths representing embed files.
* @type {string[]}
*/
const embedFiles = await (new Promise((resolve, reject) => {
const embedFiles = await new Promise((resolve, reject) => {
readdir(embedFilePattern, (err, files) => {
//handling error
if (err) {
Expand All @@ -385,7 +385,7 @@ export class Baker extends EventEmitter {

resolve(files);
});
}));
});

if (!embedFiles.length) return;

Expand Down

0 comments on commit 3bd4a8e

Please sign in to comment.