forked from mystiq/hydrogen-web
remove unneeded union type and simplify code
This commit is contained in:
parent
42e5fb33ba
commit
fde0163b97
1 changed files with 1 additions and 2 deletions
|
@ -187,9 +187,8 @@ export class LogItem implements ILogItem {
|
||||||
if (this.end) {
|
if (this.end) {
|
||||||
console.trace("log item is finished, additional logs will likely not be recorded");
|
console.trace("log item is finished, additional logs will likely not be recorded");
|
||||||
}
|
}
|
||||||
let result: T | Promise<T>;
|
|
||||||
try {
|
try {
|
||||||
result = callback(this);
|
const result = callback(this);
|
||||||
if (result instanceof Promise) {
|
if (result instanceof Promise) {
|
||||||
return result.then(promiseResult => {
|
return result.then(promiseResult => {
|
||||||
this.finish();
|
this.finish();
|
||||||
|
|
Loading…
Reference in a new issue