diff --git a/src/Common/Unity/AssetManager.ts b/src/Common/Unity/AssetManager.ts index 28bfb02e2..ba294c000 100644 --- a/src/Common/Unity/AssetManager.ts +++ b/src/Common/Unity/AssetManager.ts @@ -156,8 +156,10 @@ export class AssetFile { this.waitForHeaderPromise = null; } - public waitForHeader(): Promise { - return assertExists(this.waitForHeaderPromise); + public async waitForHeader() { + if (this.waitForHeaderPromise !== null) { + await this.waitForHeaderPromise; + } } private async initFullInternal(dataFetcher: DataFetcher): Promise {