File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Emitter(More.prototype)
36
36
* @api private
37
37
*/
38
38
More . prototype . onscroll = function ( e ) {
39
- if ( this . loading || this . _disabled ) return
39
+ if ( this . loading || this . _disabled ) return Promise . resolve ( null )
40
40
if ( ! check ( this . el , this . scrollable , this . paddingBottom ) && e !== true ) return
41
41
this . div . style . visibility = 'visible'
42
42
// var h = computedStyle(this.el, 'height')
@@ -51,8 +51,9 @@ More.prototype.onscroll = function (e) {
51
51
}
52
52
var res = this . callback ( cb )
53
53
if ( res && typeof res . then === 'function' ) {
54
- res . then ( cb , cb )
54
+ return res . then ( cb , cb )
55
55
}
56
+ return Promise . resolve ( null )
56
57
}
57
58
58
59
/**
@@ -85,7 +86,7 @@ More.prototype.enable = function () {
85
86
* @api public
86
87
*/
87
88
More . prototype . load = function ( ) {
88
- this . onscroll ( true )
89
+ return this . onscroll ( true )
89
90
}
90
91
91
92
/**
You can’t perform that action at this time.
0 commit comments