diff --git a/src/logging/LogItem.ts b/src/logging/LogItem.ts index 4fb8daa0..f9262db7 100644 --- a/src/logging/LogItem.ts +++ b/src/logging/LogItem.ts @@ -187,9 +187,8 @@ export class LogItem implements ILogItem { if (this.end) { console.trace("log item is finished, additional logs will likely not be recorded"); } - let result: T | Promise; try { - result = callback(this); + const result = callback(this); if (result instanceof Promise) { return result.then(promiseResult => { this.finish();