Skip to content

Commit

Permalink
added guard for remove
Browse files Browse the repository at this point in the history
  • Loading branch information
youzi committed May 26, 2016
1 parent 20d060c commit daa2819
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ exports.properties = {
props(target, pnode)
},
state (target, state, type, stamp, subs, tree, id, pid) {
const pnode = getParent(type, stamp, subs, tree, pid)
if (!pnode) {
console.error('No pnode')
return
}
if (!pnode._styleStaticParsed) {
props(target, pnode)
pnode._styleStaticParsed = true
if (type !== 'remove') {
const pnode = getParent(type, stamp, subs, tree, pid)
if (!pnode._styleStaticParsed) {
props(target, pnode)
pnode._styleStaticParsed = true
}
}
}
},
Expand Down

0 comments on commit daa2819

Please sign in to comment.