Skip to content

Commit b9f62f7

Browse files
committed
hide all $ properties on vm
1 parent 0f7a929 commit b9f62f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/compiler.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var Emitter = require('./emitter'),
1313
slice = Array.prototype.slice,
1414
log = utils.log,
1515
makeHash = utils.hash,
16+
def = utils.defProtected,
1617
hasOwn = Object.prototype.hasOwnProperty
1718

1819
/**
@@ -41,9 +42,9 @@ function Compiler (vm, options) {
4142
if (scope) utils.extend(vm, scope, true)
4243

4344
compiler.vm = vm
44-
vm.$ = makeHash()
45-
vm.$el = el
46-
vm.$compiler = compiler
45+
def(vm, '$', makeHash())
46+
def(vm, '$el', el)
47+
def(vm, '$compiler', compiler)
4748

4849
// keep track of directives and expressions
4950
// so they can be unbound during destroy()

0 commit comments

Comments
 (0)