Skip to content

Commit

Permalink
refactor: remove basically unused var result
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowtime2000 committed Dec 5, 2020
1 parent 1303773 commit 771a17a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default function render(
const options = getConfig(config || {})

if (options.async) {
let result
if (cb) {
// If user passes callback
try {
Expand All @@ -71,8 +70,7 @@ export default function render(
if (typeof promiseImpl === 'function') {
return new promiseImpl(function (resolve: Function, reject: Function) {
try {
result = handleCache(template, options)(data, options)
resolve(result)
resolve(handleCache(template, options)(data, options))
} catch (err) {
reject(err)
}
Expand Down

0 comments on commit 771a17a

Please sign in to comment.