mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-12 13:07:17 +01:00
remove unneeded union type and simplify code
This commit is contained in:
parent
42e5fb33ba
commit
fde0163b97
@ -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…
x
Reference in New Issue
Block a user