Permalink
Browse files

Return forEach result so that jsgi-node properly waits for the comple…

…tion of the streaming
  • Loading branch information...
1 parent e5fe66b commit 83cb6ae94006b09f35ac27903c3f84eeb86107c7 @kriszyp kriszyp committed Oct 29, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 media.js
View
@@ -68,7 +68,7 @@ Media.optimumMedia = function(source, acceptTypeHeader){
// loadFile could return a promise
forEach: function(each){
return when(exports.loadFile(alternate), function(file){
- file.forEach(each);
+ return file.forEach(each);
});
}
};

0 comments on commit 83cb6ae

Please sign in to comment.