mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
closes #2702
This commit is contained in:
@@ -43,13 +43,15 @@ widgets.render = function (uid, area, req, res, callback) {
|
||||
data: widget.data,
|
||||
req: req,
|
||||
res: res,
|
||||
}, function (err, html) {
|
||||
if (err || html === null) {
|
||||
}, function (err, data) {
|
||||
if (err || data === null) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
var html = data;
|
||||
if (typeof html !== 'string') {
|
||||
html = '';
|
||||
html = data.html;
|
||||
} else {
|
||||
winston.warn('[widgets.render] passing a string is deprecated!, filter:widget.render:' + widget.widget + '. Please set hookData.html in your plugin.');
|
||||
}
|
||||
|
||||
if (widget.data.container && widget.data.container.match('{body}')) {
|
||||
|
||||
Reference in New Issue
Block a user