Skip to content

Commit cf4dcf1

Browse files
author
pemrouz
committed
style: use arrows where over key
1 parent 822c1e6 commit cf4dcf1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -------------------------------------------
2-
// API: Pre-applies Scoped CSS [css=name]
2+
// Pre-applies Scoped CSS [css=name]
33
// -------------------------------------------
44
export default function precss(ripple){
55
if (!client) return;
@@ -30,13 +30,13 @@ const render = ripple => next => host => {
3030
// retrieve styles
3131
styles = css
3232
.map(from(ripple.resources))
33-
.map(key('body'))
33+
.map(d => d.body)
3434
.map(shadow ? identity : transform(css))
3535

3636
// reuse or create style tag
3737
css
3838
.map(d => raw(`style[resource="${d}"]`, shadow ? root : head) || el(`style[resource=${d}]`))
39-
.map(key('innerHTML', (d, i) => styles[i]))
39+
.map((d, i) => d.innerHTML = styles[i])
4040
.filter(not(by('parentNode')))
4141
.map(d => shadow ? root.insertBefore(d, root.firstChild) : head.appendChild(d))
4242

@@ -59,7 +59,6 @@ import from from 'utilise/from'
5959
import all from 'utilise/all'
6060
import raw from 'utilise/raw'
6161
import str from 'utilise/str'
62-
import key from 'utilise/key'
6362
import not from 'utilise/not'
6463
import by from 'utilise/by'
6564
import is from 'utilise/is'

0 commit comments

Comments
 (0)