We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08a4844 commit af266b3Copy full SHA for af266b3
src/index.js
@@ -60,14 +60,19 @@ const resource = ripple => name => {
60
}
61
62
// batch renders on render frames
63
-const batch = ripple => el => el.pending
64
- ? el.pending.push(ripple.change)
65
- : (el.pending = [ripple.change]
66
- , requestAnimationFrame(d => {
67
- el.change = el.pending
+const batch = ripple => el => {
+ if (!el.pending) {
+ el.pending = []
+ requestAnimationFrame(d => {
+ el.changes = el.pending
68
delete el.pending
69
ripple.render(el)
70
- }))
+ })
71
+ }
72
+
73
+ if (ripple.change)
74
+ el.pending.push(ripple.change[1])
75
+}
76
77
// main function to render a particular custom element with any data it needs
78
const invoke = ripple => el => {
0 commit comments