File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import debounce from 'debounce-fn';
3
3
import observeEl from '../libs/simplified-element-observer' ;
4
4
5
5
let btn ;
6
- let newsfeedObserver ;
7
6
8
7
const loadMore = debounce ( ( ) => {
9
8
btn . click ( ) ;
9
+ btn . textContent = 'loading...' ;
10
10
11
11
// If GH hasn't loaded the JS, the click will not load anything.
12
12
// We can detect if it worked by looking at the button's state,
@@ -37,8 +37,6 @@ const findButton = () => {
37
37
btn = select ( '.ajax-pagination-btn' ) ;
38
38
if ( btn ) {
39
39
inView . observe ( btn ) ;
40
- } else if ( newsfeedObserver ) {
41
- newsfeedObserver . disconnect ( ) ;
42
40
}
43
41
} ;
44
42
@@ -48,6 +46,6 @@ export default () => {
48
46
// If GH hasn't loaded the JS,
49
47
// the fake click will submit the form without ajax.
50
48
form . addEventListener ( 'submit' , event => event . preventDefault ( ) ) ;
51
- newsfeedObserver = observeEl ( '#dashboard .news' , findButton ) ;
49
+ observeEl ( '#dashboard .news' , findButton ) ;
52
50
}
53
51
} ;
You can’t perform that action at this time.
0 commit comments