Skip to content

Commit

Permalink
feat: remove unnecessary promise code
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrelbug committed Jun 10, 2023
1 parent 4620af9 commit aeec694
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,7 @@ export function renderAsync(
const res = templateFn.call(this, data, options);

// Return a promise
return new Promise(function (resolve: Function, reject: Function) {
try {
resolve(res);
} catch (err) {
reject(err);
}
});
return Promise.resolve(res);
}

export function renderString(this: Eta, template: string, data: object): string {
Expand Down

0 comments on commit aeec694

Please sign in to comment.