mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 11:05:03 +01:00
Fix misleading comment
This commit is contained in:
parent
489f00f57a
commit
012986df65
@ -545,6 +545,7 @@ export class BaseRoom extends EventEmitter {
|
||||
async openTimeline(log = null) {
|
||||
return await this._platform.logger.wrapOrRun(log, "open timeline", async log => {
|
||||
if (this._timelineLoadPromise) {
|
||||
// This is to prevent races between multiple calls to this method
|
||||
await this._timelineLoadPromise;
|
||||
}
|
||||
let resolve;
|
||||
@ -556,10 +557,6 @@ export class BaseRoom extends EventEmitter {
|
||||
});
|
||||
log.set("id", this.id);
|
||||
if (this._timeline) {
|
||||
/**
|
||||
* It's possible that timeline was created but timeline.load() has not yet finished.
|
||||
* We only return the timeline when it has completely loaded!
|
||||
*/
|
||||
log.log({ l: "Returning existing timeline" });
|
||||
resolve();
|
||||
return this._timeline;
|
||||
|
Loading…
Reference in New Issue
Block a user