prevent crash on widget containers

v1.18.x
psychobunny 11 years ago
parent 15773f28f2
commit d89c0d698e

@ -1,3 +1,5 @@
"use strict";
var async = require('async'),
winston = require('winston'),
plugins = require('./plugins'),
@ -24,7 +26,7 @@ var async = require('async'),
data: widget.data
}, function(err, html){
if (widget.data.container && widget.data.container.match('{body}')) {
html = templates.prepare(widget.data.container).parse({
html = templates.parse(widget.data.container, {
title: widget.data.title,
body: html
});
@ -48,7 +50,7 @@ var async = require('async'),
return callback(err, []);
}
callback(err, JSON.parse(widgets));
})
});
};
Widgets.setArea = function(area, callback) {

Loading…
Cancel
Save