Skip to content

Commit

Permalink
Release-v0.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 25, 2014
1 parent f127ccb commit e1ea3fc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 38 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.10.1",
"version": "0.10.2",
"main": "dist/vue.js",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
"authors": ["Evan You <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.10.1",
"version": "0.10.2",
"main": "src/main.js",
"author": "Evan You <[email protected]>",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
Expand Down
44 changes: 12 additions & 32 deletions dist/vue.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Vue.js v0.10.1
Vue.js v0.10.2
(c) 2014 Evan You
License: MIT
*/
Expand Down Expand Up @@ -1658,7 +1658,7 @@ CompilerProto.getOption = function (type, id, silent) {
? parent.getOption(type, id, silent)
: globalAssets[type] && globalAssets[type][id]
)
if (!res && !silent) {
if (!res && !silent && typeof id === 'string') {
utils.warn('Unknown ' + type.slice(0, -1) + ': ' + id)
}
return res
Expand Down Expand Up @@ -3831,7 +3831,6 @@ module.exports = {
ctn.insertBefore(this.ref, el)
ctn.removeChild(el)

this.initiated = false
this.collection = null
this.vms = null

Expand All @@ -3847,13 +3846,6 @@ module.exports = {
}
}

// if initiating with an empty collection, we need to
// force a compile so that we get all the bindings for
// dependency extraction.
if (!this.initiated && (!collection || !collection.length)) {
this.dryBuild()
}

// keep reference of old data and VMs
// so we can reuse them if possible
this.oldVMs = this.vms
Expand All @@ -3871,24 +3863,6 @@ module.exports = {

},

/**
* Run a dry build just to collect bindings
*/
dryBuild: function () {
var el = this.el.cloneNode(true),
Ctor = this.compiler.resolveComponent(el)
new Ctor({
el : el,
parent : this.vm,
data : { $index: 0 },
compilerOptions: {
repeat: true,
expCache: this.expCache
}
}).$destroy()
this.initiated = true
},

init: function (collection, isObject) {
var vm, vms = []
for (var i = 0, l = collection.length; i < l; i++) {
Expand Down Expand Up @@ -3949,7 +3923,9 @@ module.exports = {
// second pass, collect old reused and destroy unused
for (i = 0, l = oldVMs.length; i < l; i++) {
vm = oldVMs[i]
item = vm.$data
item = this.arg
? vm.$data[this.arg]
: vm.$data
if (item.$reused) {
vm.$reused = true
delete item.$reused
Expand All @@ -3964,7 +3940,9 @@ module.exports = {
vms[vm.$index] = vm
} else {
// this one can be destroyed.
delete item.__emitter__[this.identifier]
if (item.__emitter__) {
delete item.__emitter__[this.identifier]
}
vm.$destroy()
}
}
Expand Down Expand Up @@ -4035,8 +4013,10 @@ module.exports = {
}
})

// attach an ienumerable identifier
data.__emitter__[this.identifier] = true
if (isObject) {
// attach an ienumerable identifier to the raw data
(raw || data).__emitter__[this.identifier] = true
}

if (wrap) {
var self = this,
Expand Down
6 changes: 3 additions & 3 deletions dist/vue.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.10.1",
"version": "0.10.2",
"author": {
"name": "Evan You",
"email": "[email protected]",
Expand Down

0 comments on commit e1ea3fc

Please sign in to comment.