-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
Vue.js version
2.1.10
Reproduction Link
https://jsfiddle.net/blackjid/br2h9pko/1/
Steps to reproduce
Have and element with just one space inside a <pre>
tag element.
<div id="app">
<pre>
<span> </span>
</pre>
</div>
and initialize vue in a parent element
new Vue({
el: '#app'
});
What is Expected?
Vue initializes correctly.
What is actually happening?
An exception is thrown.
vue.js:7105 Uncaught TypeError: Cannot read property 'text' of undefined
at Object.chars (vue.js:7105)
at parseHTML (vue.js:6401)
at parse (vue.js:6923)
at compile$1 (vue.js:8003)
at compile$$1 (vue.js:8425)
at compileToFunctions (vue.js:8458)
at Vue$3.$mount (vue.js:8536)
at Vue$3.Vue._init (vue.js:3379)
at new Vue$3 (vue.js:3427)
What did I try
- Adding a
v-pre
attribute to the<pre>
tag or to a wrapper element. This didn't work either - Changing the space with a
. This worked, but you don't always control the code that you are bootstrapping vue on.