File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class StaticServer {
54
54
55
55
this . started = false ;
56
56
this . _origin = undefined ;
57
+ this . _handleAppStateChangeFn = this . _handleAppStateChange . bind ( this ) ;
57
58
}
58
59
59
60
start ( ) {
@@ -65,7 +66,7 @@ class StaticServer {
65
66
this . running = true ;
66
67
67
68
if ( ! this . keepAlive && ( Platform . OS === 'android' ) ) {
68
- AppState . addEventListener ( 'change' , this . _handleAppStateChange . bind ( this ) ) ;
69
+ AppState . addEventListener ( 'change' , this . _handleAppStateChangeFn ) ;
69
70
}
70
71
71
72
return FPStaticServer . start ( this . port , this . root , this . localOnly , this . keepAlive )
@@ -85,7 +86,7 @@ class StaticServer {
85
86
this . stop ( ) ;
86
87
this . started = false ;
87
88
this . _origin = undefined ;
88
- AppState . removeEventListener ( 'change' , this . _handleAppStateChange . bind ( this ) ) ;
89
+ AppState . removeEventListener ( 'change' , this . _handleAppStateChangeFn ) ;
89
90
}
90
91
91
92
_handleAppStateChange ( appState ) {
You can’t perform that action at this time.
0 commit comments