Skip to content

Commit 609d4e1

Browse files
Make skipDefaultHistorySetupTransition per-route flag
1 parent 3225817 commit 609d4e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extensions/plugin-history-sync/src/RouteLike.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type Route<ComponentType> = {
1010
params: Record<string, string>,
1111
) => ComponentType extends ActivityComponentType<infer U> ? U : {};
1212
defaultHistory?: (params: Record<string, string>) => HistoryEntry[];
13+
skipDefaultHistorySetupTransition?: boolean;
1314
};
1415

1516
export type HistoryEntry = {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ type HistorySyncPluginOptions<T, K extends Extract<keyof T, string>> = (
6161
useHash?: boolean;
6262
history?: History;
6363
urlPatternOptions?: UrlPatternOptions;
64-
skipDefaultHistorySetupTransition?: boolean;
6564
};
6665

6766
export function historySyncPlugin<
@@ -311,7 +310,7 @@ export function historySyncPlugin<
311310
},
312311
});
313312

314-
if (options.skipDefaultHistorySetupTransition) {
313+
if (targetActivityRoute.skipDefaultHistorySetupTransition) {
315314
initialSetupProcess = new SerialNavigationProcess([
316315
() => [
317316
...defaultHistory.flatMap((historyEntry) =>

0 commit comments

Comments
 (0)