mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
dont crash if html is not string
This commit is contained in:
@@ -44,6 +44,10 @@ var async = require('async'),
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (typeof html !== 'string') {
|
||||
html = '';
|
||||
}
|
||||
|
||||
if (widget.data.container && widget.data.container.match('{body}')) {
|
||||
html = templates.parse(widget.data.container, {
|
||||
title: widget.data.title,
|
||||
|
||||
Reference in New Issue
Block a user