Merge pull request #5663 from NodeBB/sounds-fix

Fix soundpacks not working, auto install dependencies, defer logging in tests
This commit is contained in:
Julian Lam
2017-05-11 15:22:38 -04:00
committed by GitHub
3 changed files with 73 additions and 17 deletions

View File

@@ -263,12 +263,12 @@ module.exports = function (Plugins) {
soundpack.id = pluginData.id;
soundpack.dir = path.join(pluginData.path, soundpack.dir);
async.each(Object.keys(soundpack.sounds), function (key, next) {
file.exists(path.join(soundpack.dir, soundpack.sounds[key]), function (exists) {
file.exists(path.join(soundpack.dir, soundpack.sounds[key]), function (err, exists) {
if (!exists) {
delete soundpack.sounds[key];
}
next();
next(err);
});
}, function (err) {
if (err) {