LK HO
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
server/modules/rendering/html-core/renderer.js
|
|
@ -237,7 +237,7 @@ module.exports = { |
|
|
|
// --------------------------------
|
|
|
|
|
|
|
|
$('body').contents().toArray().forEach(item => { |
|
|
|
if (item.type === 'text' && item.parent.name === 'body') { |
|
|
|
if (item && item.type === 'text' && item.parent.name === 'body') { |
|
|
|
$(item).wrap('<div></div>') |
|
|
|
} |
|
|
|
}) |
|
|
@ -249,7 +249,7 @@ module.exports = { |
|
|
|
function iterateMustacheNode (node) { |
|
|
|
const list = $(node).contents().toArray() |
|
|
|
list.forEach(item => { |
|
|
|
if (item.type === 'text') { |
|
|
|
if (item && item.type === 'text') { |
|
|
|
const rawText = $(item).text().replace(/\r?\n|\r/g, '') |
|
|
|
if (mustacheRegExp.test(rawText)) { |
|
|
|
$(item).parent().attr('v-pre', true) |
|
|
|