Skip to content

Commit d740e0e

Browse files
author
Evan You
committed
fix #144: compiler.el is not correctly set with replace:true
1 parent 89d32e5 commit d740e0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function Compiler (vm, options) {
4545
extend(compiler, options.compilerOptions)
4646

4747
// initialize element
48-
var el = compiler.setupElement(options)
48+
var el = compiler.el = compiler.setupElement(options)
4949
log('\nnew VM instance:', el.tagName, '\n')
5050

5151
// set compiler properties
@@ -145,7 +145,7 @@ var CompilerProto = Compiler.prototype
145145
*/
146146
CompilerProto.setupElement = function (options) {
147147
// create the node first
148-
var el = this.el = typeof options.el === 'string'
148+
var el = typeof options.el === 'string'
149149
? document.querySelector(options.el)
150150
: options.el || document.createElement(options.tagName || 'div')
151151

0 commit comments

Comments
 (0)