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 eventSoundMapping;
var files; var files;
socket.on('event:sounds.reloadMapping', loadMapping); socket.on('event:sounds.reloadMapping', function() {
function loadMapping(callback) {
callback = callback || function() {};
socket.emit('modules.sounds.getMapping', function(err, mapping) { socket.emit('modules.sounds.getMapping', function(err, mapping) {
if (err) { if (err) {
return app.alertError('[sounds] Could not load sound mapping!'); return app.alertError('[sounds] Could not load sound mapping!');
} }
eventSoundMapping = mapping; eventSoundMapping = mapping;
callback();
}); });
} });
function loadData(callback) { function loadData(callback) {
socket.emit('modules.sounds.getData', function(err, data) { socket.emit('modules.sounds.getData', function(err, data) {

Loading…
Cancel
Save