Skip to content

Commit 3ebd445

Browse files
committed
fix(share): fix _changeRoutingOnSever delegate issue
1 parent 7b4a15b commit 3ebd445

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

packages/reactant-share/src/modules/portDetector.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,15 @@ export class PortDetector {
402402
)
403403
return;
404404
const store = (this as Service)[storeKey];
405+
if (__DEV__) {
406+
console.log(
407+
'[syncFullState]',
408+
'old sequence:',
409+
this.lastAction.sequence,
410+
'new sequence:',
411+
fullState[this.lastAction.stateKey]._sequence
412+
);
413+
}
405414
store!.dispatch({
406415
type: `${actionIdentifier}_${loadFullStateActionName}`,
407416
state: this.getNextState(fullState),

packages/reactant-share/src/modules/router.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,19 @@ class ReactantRouter extends BaseReactantRouter {
221221
this,
222222
() => this.router,
223223
() => {
224-
delegate(this as any, '_changeRoutingOnSever', [
225-
this.portDetector.name,
226-
this.router,
227-
this.lastRoutedTimestamp,
228-
this.portDetector.clientId,
229-
]);
224+
delegate(
225+
this as any,
226+
'_changeRoutingOnSever',
227+
[
228+
this.portDetector.name,
229+
this.router,
230+
this.lastRoutedTimestamp,
231+
this.portDetector.clientId,
232+
],
233+
{
234+
respond: false,
235+
}
236+
);
230237
}
231238
);
232239
});

0 commit comments

Comments
 (0)