Skip to content

Commit

Permalink
dont use arg with same name as fn
Browse files Browse the repository at this point in the history
  • Loading branch information
youzi committed Sep 30, 2016
1 parent dead67a commit 528b85d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports.properties = {
static (target, pnode) {
props(target, pnode)
},
state (target, state, type, stamp, subs, tree, id, pid) {
state (target, s, type, stamp, subs, tree, id, pid) {
if (type !== 'remove') {
const pnode = getParent(type, stamp, subs, tree, pid)
if (!pnode._styleStaticParsed) {
Expand Down
6 changes: 3 additions & 3 deletions lib/px.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ exports.types = {
static (target, pnode) {
pnode.style[target.key] = unit(target.compute(), 'px')
},
state (target, state, type, stamp, subs, tree, id, pid) {
state (target, _state, type, stamp, subs, tree, id, pid) {
if (type !== 'remove') { // fix
const pnode = getParent(type, stamp, subs, tree, pid) // fix
pnode.style[target.key] = unit(
state // fix
? target.compute(state)
_state // fix
? target.compute(_state)
: target.compute(), 'px'
)
}
Expand Down
6 changes: 3 additions & 3 deletions lib/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ exports.render = {
// needs coverage
pnode.style[target.name || target.key] = target.compute()
},
state (target, state, type, stamp, subs, tree, id, pid) {
state (target, _state, type, stamp, subs, tree, id, pid) {
if (type !== 'remove') {
const pnode = getParent(type, stamp, subs, tree, pid)
pnode.style[target.name || target.key] = state
? target.compute(state)
pnode.style[target.name || target.key] = _state
? target.compute(_state)
: target.compute()
}
}
Expand Down

0 comments on commit 528b85d

Please sign in to comment.