v1.18.x
psychobunny 11 years ago
parent 9f40cd03e8
commit 5d344b3dac

@ -1,3 +1,5 @@
"use strict";
var mkdirp = require('mkdirp'), var mkdirp = require('mkdirp'),
rimraf = require('rimraf'), rimraf = require('rimraf'),
winston = require('winston'), winston = require('winston'),
@ -17,7 +19,9 @@ Templates.compile = function(callback) {
if (cluster.isWorker && process.env.cluster_setup !== 'true') { if (cluster.isWorker && process.env.cluster_setup !== 'true') {
return setTimeout(function() { return setTimeout(function() {
emitter.emit('templates:compiled'); emitter.emit('templates:compiled');
if (callback) callback(); if (callback) {
callback();
}
}, 1000); }, 1000);
} }
@ -97,7 +101,9 @@ Templates.compile = function(callback) {
} else { } else {
winston.info('[themes] Successfully compiled templates.'); winston.info('[themes] Successfully compiled templates.');
emitter.emit('templates:compiled'); emitter.emit('templates:compiled');
if (callback) callback(); if (callback) {
callback();
}
} }
}); });
}); });

Loading…
Cancel
Save