File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/common/history/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,13 @@ export const HistoryContainerModule = new ContainerModule(
2222 bind ( HistoryConfig ) . toSelf ( ) . inSingletonScope ( ) ;
2323
2424 onActivation ( HistoryService , ( ctx , historyService ) => {
25- const historyManager =
26- ctx . container ?. parent ?. get ( HistoryManager ) || ctx . container . get ( HistoryManager ) ;
25+ let historyManager ;
26+
27+ if ( ctx . container ?. parent ?. isBound ( HistoryManager ) ) {
28+ historyManager = ctx . container ?. parent ?. get ( HistoryManager ) ;
29+ } else {
30+ historyManager = ctx . container . get ( HistoryManager ) ;
31+ }
2732
2833 if ( ! historyManager ) {
2934 return historyService ;
@@ -33,5 +38,5 @@ export const HistoryContainerModule = new ContainerModule(
3338 historyManager . registerHistoryService ( historyService ) ;
3439 return historyService ;
3540 } ) ;
36- } ,
41+ }
3742) ;
You can’t perform that action at this time.
0 commit comments