Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vkalpias committed Nov 25, 2015
1 parent 89aaa6f commit 5346d1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/framework/components/audiosource/audiosource_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,15 @@ pc.extend(pc, function () {
// load assets that haven't been loaded yet
var assets = this.data.assets;
if (assets) {
var registry = this.system.app.assets;

for (var i = 0, len = assets.length; i < len; i++) {
var asset = assets[i];
if (! (asset instanceof pc.Asset))
asset = this.system.app.assets.get(asset);
asset = registry.get(asset);

if (asset && !asset.resource) {
this.system.app.assets.load(asset);
registry.load(asset);
}
}
}
Expand Down

0 comments on commit 5346d1a

Please sign in to comment.