Use on() instead of once() for node 0.2.x compatibility.
This commit is contained in:
parent
a4f2d4af00
commit
756d5fb913
@ -93,8 +93,8 @@ carto.Renderer = function Renderer(env) {
|
||||
}
|
||||
|
||||
var external = new External(that.env, l.Datasource.file, l.name);
|
||||
external.once('err', next)
|
||||
external.once('complete', function(external) {
|
||||
external.on('err', next)
|
||||
external.on('complete', function(external) {
|
||||
external.findDataFile(function(err, file) {
|
||||
if (err) {
|
||||
next(new Error('Datasource could not be downloaded.'));
|
||||
@ -129,11 +129,11 @@ carto.Renderer = function Renderer(env) {
|
||||
// that fail.
|
||||
var next = group();
|
||||
var external = new External(that.env, s, path.basename(s));
|
||||
external.once('complete', function(external) {
|
||||
external.on('complete', function(external) {
|
||||
m.Stylesheet[k] = external.path();
|
||||
next();
|
||||
});
|
||||
external.once('err', function(err) {
|
||||
external.on('err', function(err) {
|
||||
next(new Error('Stylesheet "' + s + '" could not be loaded.'));
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user