Skip to content

Commit e69be38

Browse files
committed
fix(reactant-share): fix toBeRouted issue
1 parent 46db025 commit e69be38

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/reactant-share/src/router.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ class ReactantRouter extends BaseReactantRouter {
5454
if (document.visibilityState === 'visible') {
5555
this.portDetector.syncFullState({ forceSync: false });
5656
await this.portDetector.syncFullStatePromise;
57-
if (this._toBeRouted) {
58-
const fn = this._toBeRouted;
59-
this._toBeRouted = null;
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-
protected _toBeRouted: (() => void) | null = null;
212+
toBeRouted: (() => void) | null = null;
213213

214214
@state
215215
protected _routers: Record<string, RouterState | undefined> = {

0 commit comments

Comments
 (0)