From 06eb4389e6f6652bc8abdc3af8cc3d7682c623ff Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Tue, 23 Jun 2015 14:07:46 +0300 Subject: [PATCH] [FIX] Error when loading audio source assets --- .../components/audiosource/audiosource_component.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/framework/components/audiosource/audiosource_component.js b/src/framework/components/audiosource/audiosource_component.js index 4fd27f94c22..cae85d29261 100644 --- a/src/framework/components/audiosource/audiosource_component.js +++ b/src/framework/components/audiosource/audiosource_component.js @@ -293,16 +293,16 @@ pc.extend(pc, function () { }); } else { // don't wait for assets that aren't in the registry - count-- + count--; if (count === 0) { _done(); } // but if they are added insert them into source list - assets.on("add:" + ids[index], function (asset) { + this.system.app.assets.on("add:" + ids[index], function (asset) { asset.ready(function (asset) { this.data.sources[asset.name] = asset.resource; }); - }) + }); } }, this); }