Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
pemrouz committed May 2, 2016
1 parent d4d8c3b commit acc58b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ var render = function render(ripple) {

var name = _ref2[0];
var values = _ref2[1];

return values.some(function (v, i) {
var from = (0, _attr2.default)(el, name) || '';
return (0, _includes2.default)(v)(from) ? false : (0, _attr2.default)(el, name, (from + ' ' + v).trim());
Expand Down
12 changes: 5 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ const render = ripple => next => el => {
, attrs = headers.attrs = headers.attrs || parse(headers.needs, component)

return attrs
.map(([name, values]) => {
return values.some((v, i) => {
const from = attr(el, name) || ''
return includes(v)(from) ? false
: attr(el, name, (from + ' ' + v).trim())
})
})
.map(([name, values]) => values.some((v, i) => {
const from = attr(el, name) || ''
return includes(v)(from) ? false
: attr(el, name, (from + ' ' + v).trim())
}))
.some(Boolean) ? el.draw() : next(el)
}

Expand Down

0 comments on commit acc58b9

Please sign in to comment.