ReferenceError in sound API?
Closed this issue · 4 comments
jweissman commented
The sound API seems broken -- from the compiled JS:
atom.preloadSounds = function(sfx, cb) {
var name, toLoad, url, _results;
if (!atom.audioContext) {
return typeof cb === "function" ? cb('No audio support') : void 0;
}
toLoad = 0;
_results = [];
for (name in sfx) {
url = sfx[name];
toLoad++;
_results.push((function(name, url) {
return atom.loadSound("sounds/" + url, function(error, buffer) {
if (error) {
console.error(error);
}
if (buffer) {
atom.sfx[s] = buffer;
Here's where we throw Uncaught ReferenceError: s is not defined
.
}
if (!--toLoad) {
return typeof cb === "function" ? cb() : void 0;
}
});
})(name, url));
}
return _results;
};
jweissman commented
This seems to be resolved by replacing s
with name
.
jweissman commented
Closing for the time being.
nornagon commented
Send a pull request?
On Monday, 15 April 2013, Joseph Weissman wrote:
Closing for the time being.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-16366780
.
j
jweissman commented
PR'd! :)