File tree Expand file tree Collapse file tree
extensions/plugin-history-sync/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ export function historySyncPlugin<
8585 T extends { [ activityName : string ] : unknown } ,
8686 K extends Extract < keyof T , string > ,
8787> ( options : HistorySyncPluginOptions < T , K > ) : HistorySyncPlugin < T > {
88+ if ( "config" in options ) {
89+ options . config . decorate ( "historySync" , {
90+ makeTemplate,
91+ urlPatternOptions : options . urlPatternOptions ,
92+ } ) ;
93+ }
94+
8895 const history =
8996 options . history ??
9097 ( typeof window === "undefined"
@@ -111,13 +118,6 @@ export function historySyncPlugin<
111118 urlPatternOptions : options . urlPatternOptions ,
112119 } ) ;
113120
114- if ( "config" in options ) {
115- options . config . decorate ( "historySync" , {
116- makeTemplate,
117- urlPatternOptions : options . urlPatternOptions ,
118- } ) ;
119- }
120-
121121 const plugin : StackflowReactPlugin < T > = ( ) => {
122122 let initialSetupProcess : NavigationProcess | null = null ;
123123 const activityActivationMonitors : ActivityActivationMonitor [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments