fix undefined callback in sounds

v1.18.x
barisusakli 9 years ago
parent 6cc08f3868
commit 19bc6fa133

@ -8,18 +8,14 @@ define('sounds', ['buzz'], function(buzz) {
var eventSoundMapping;
var files;
socket.on('event:sounds.reloadMapping', loadMapping);
function loadMapping(callback) {
callback = callback || function() {};
socket.on('event:sounds.reloadMapping', function() {
socket.emit('modules.sounds.getMapping', function(err, mapping) {
if (err) {
return app.alertError('[sounds] Could not load sound mapping!');
}
eventSoundMapping = mapping;
callback();
});
}
});
function loadData(callback) {
socket.emit('modules.sounds.getData', function(err, data) {

Loading…
Cancel
Save