Skip to content

Commit 4ef77e7

Browse files
refactor(plugin-history-sync): restore config decoration order
1 parent 6173fc7 commit 4ef77e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎extensions/plugin-history-sync/src/historySyncPlugin.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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[] = [];

0 commit comments

Comments
 (0)