Skip to content

Commit 5f91889

Browse files
authored
Fix the render loop created by the empty param prefs (#6105)
1 parent e9c656d commit 5f91889

File tree

1 file changed

+2
-1
lines changed
  • ui/packages/shared/components/src/hooks/URLState

1 file changed

+2
-1
lines changed

ui/packages/shared/components/src/hooks/URLState/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ interface URLState {
4646
}
4747

4848
const URLStateContext = createContext<URLState | undefined>(undefined);
49+
const EMPTY_PREFS = {};
4950

5051
export const URLStateProvider = ({
5152
children,
5253
navigateTo,
53-
paramPreferences = {},
54+
paramPreferences = EMPTY_PREFS,
5455
}: {
5556
children: ReactNode;
5657
navigateTo: NavigateFunction;

0 commit comments

Comments
 (0)