@@ -49,14 +49,14 @@ class ReactantRouter extends BaseReactantRouter {
4949 } ) ;
5050
5151 this . portDetector . onClient ( ( ) => {
52- if ( ! portDetector . sharedAppOptions . forcedSyncClient ) {
52+ if ( ! this . portDetector . sharedAppOptions . forcedSyncClient ) {
5353 const visibilitychange = async ( ) => {
5454 if ( document . visibilityState === 'visible' ) {
55- portDetector . syncFullState ( { forceSync : false } ) ;
56- await portDetector . syncFullStatePromise ;
57- if ( this . toBeRouted ) {
58- const fn = this . toBeRouted ;
59- this . toBeRouted = null ;
55+ this . portDetector . syncFullState ( { forceSync : false } ) ;
56+ await this . portDetector . syncFullStatePromise ;
57+ if ( this . _toBeRouted ) {
58+ const fn = this . _toBeRouted ;
59+ this . _toBeRouted = null ;
6060 fn ( ) ;
6161 }
6262 }
@@ -177,7 +177,7 @@ class ReactantRouter extends BaseReactantRouter {
177177 }
178178 } ;
179179 if ( this . portDetector . disableSyncClient ) {
180- this . toBeRouted = route ;
180+ this . _toBeRouted = route ;
181181 } else {
182182 route ( ) ;
183183 }
@@ -202,14 +202,14 @@ class ReactantRouter extends BaseReactantRouter {
202202 }
203203 } ;
204204 if ( this . portDetector . disableSyncClient ) {
205- this . toBeRouted = route ;
205+ this . _toBeRouted = route ;
206206 } else {
207207 route ( ) ;
208208 }
209209 } ) ;
210210 }
211211
212- toBeRouted : ( ( ) => void ) | null = null ;
212+ protected _toBeRouted : ( ( ) => void ) | null = null ;
213213
214214 @state
215215 protected _routers : Record < string , RouterState | undefined > = {
0 commit comments