Skip to content

Commit

Permalink
make legacy module dependencies load earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Lüth authored and Dirk Lüth committed Jan 30, 2017
1 parent ec76471 commit a5d2df9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion extras/handler/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,26 @@
function HandlerLegacy() {}

HandlerLegacy.prototype = {
onPreProcess: function(dependency) {
onPreRequest: function(dependency) {
var dependencies = settings[dependency.path] && settings[dependency.path].dependencies;

handlerModule.onPreRequest(dependency);

if(dependencies) {
dependency.enqueue = demand.apply(null, dependencies);
}
},
onPreProcess: function(dependency) {
var dependencies;

if(!dependency.enqueue) {
dependencies = settings[dependency.path] && settings[dependency.path].dependencies;

if(dependencies) {
dependency.enqueue = demand.apply(null, dependencies);
}
}
},
process: function(dependency) {
var boundResolve = resolve.bind(dependency);

Expand Down

0 comments on commit a5d2df9

Please sign in to comment.