We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c6b69e commit c1bb44aCopy full SHA for c1bb44a
src/compiler/transclude.js
@@ -65,6 +65,14 @@ function transcludeTemplate (el, options) {
65
var replacer = frag.firstChild
66
var tag = replacer.tagName && replacer.tagName.toLowerCase()
67
if (options.replace) {
68
+ /* istanbul ignore if */
69
+ if (el === document.body) {
70
+ _.warn(
71
+ 'You are mounting an instance with a template to ' +
72
+ '<body>. This will replace <body> entirely. You ' +
73
+ 'should probably use `replace: false` here.'
74
+ )
75
+ }
76
if (
77
// multi-children template
78
frag.childNodes.length > 1 ||
0 commit comments