File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,19 @@ import { getBatch } from './batch'
7
7
const nullListeners = { notify ( ) { } }
8
8
9
9
function createListenerCollection ( ) {
10
- var batch = getBatch ( ) // the current/next pattern is copied from redux's createStore code.
10
+ var batch = getBatch ( )
11
+ // the current/next pattern is copied from redux's createStore code.
11
12
// TODO: refactor+expose that code to be reusable here?
12
13
13
14
var current = { }
14
15
var id = 0
15
16
return {
16
- clear : function clear ( ) {
17
+ clear ( ) {
17
18
current = { }
18
19
} ,
19
- notify : function notify ( ) {
20
+ notify ( ) {
20
21
var listeners = current
21
- batch ( function ( ) {
22
+ batch ( ( ) => {
22
23
for ( const id in listeners ) {
23
24
listeners [ id ] ( )
24
25
}
@@ -29,7 +30,7 @@ function createListenerCollection() {
29
30
return current
30
31
} ,
31
32
32
- subscribe : function subscribe ( listener ) {
33
+ subscribe ( listener ) {
33
34
var currentId = id ++
34
35
current [ currentId ] = listener
35
36
return function unsubscribe ( ) {
You can’t perform that action at this time.
0 commit comments