Skip to content

Commit d76217f

Browse files
Ensure timed assets are loaded to update pool
1 parent 6420971 commit d76217f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/assetPool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class AssetPool {
6363
this.sortAssets();
6464
}
6565

66-
updateAssets(assets, timedAssets) {
66+
updateAssets(assets = [], timedAssets = []) {
6767
this.assets = assets.map(assetDecorationMapper(timedAssets));
6868
}
6969

src/roundware.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ export class Roundware {
237237
}
238238

239239
get assetPool() {
240-
return this._mixer && this._mixer.playlist.assetPool;
240+
return (
241+
this._mixer && this._mixer.playlist && this._mixer.playlist.assetPool
242+
);
241243
}
242244

243245
/// Returns a reduced asset list by filtering the overall pool.
@@ -265,7 +267,7 @@ export class Roundware {
265267

266268
// Update the mixer's asset pool, if any.
267269
const pool = this.assetPool;
268-
if (pool) {
270+
if (pool && this._timedAssetData) {
269271
pool.updateAssets(this._assetData, this._timedAssetData);
270272
}
271273

0 commit comments

Comments
 (0)