Skip to content

Commit

Permalink
fix: component in v-for not trigger events #54
Browse files Browse the repository at this point in the history
  • Loading branch information
elcarim5efil committed Dec 2, 2018
1 parent 5a1e65f commit 10a55ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ function getFirstNode (nodes) {
return firstNode
}

function markComponents (nodes, parentUId) {
return (nodes || []).forEach(node => {
function markComponents (nodes = [], parentUId) {
nodes.forEach(node => {
const { componentOptions } = node
if (componentOptions) {
node._mpSlotParentUId = parentUId
}
markComponents(node.children)
markComponents(node.children, parentUId)
})
}
2 changes: 1 addition & 1 deletion src/platforms/mp/runtime/instance/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function initVMToMP (vm) {
const i = vmId.indexOf(sep)
const cid = i > -1 ? vmId.slice(0, i) : vmId
const info = {
cid,
cid: vmId,
cpath: `${cid}${VM_ID_SEP}`
}

Expand Down

0 comments on commit 10a55ae

Please sign in to comment.