Skip to content

Commit

Permalink
fix jobFinished plugin call, add callback not required for plugin eve…
Browse files Browse the repository at this point in the history
…nt method
  • Loading branch information
annahassel committed Jul 8, 2014
1 parent 56c8eee commit 4181ed0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ PrerenderRenderer.prototype.afterRender = function(page) {
*/
PrerenderRenderer.prototype.jobFinished = function(job) {
this.job = null;
this.pluginEvent('jobFinished', job);
this.pluginEvent('jobFinished', [job]);
};

/*
Expand Down Expand Up @@ -214,6 +214,8 @@ PrerenderRenderer.prototype.pluginEvent = function(methodName, args, callback) {
var _this = this;
var index = 0;

callback = callback || function() {};

var next = function() {
var layer = _this.plugins[index++];
if (!layer) {
Expand Down

0 comments on commit 4181ed0

Please sign in to comment.