Skip to content

Commit 6bf8dc5

Browse files
committed
fix
1 parent f36795e commit 6bf8dc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pages/toggles/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,15 @@ const NavigationSection = ({
165165
dongleId,
166166
settings,
167167
changes,
168+
savedValues,
168169
getValue,
169170
setChanges,
170171
}: {
171172
params: ParamValue[]
172173
dongleId: string
173174
settings: Setting[]
174175
changes: Record<string, string>
176+
savedValues: Record<string, string>
175177
getValue: (s: Setting) => string | null
176178
setChanges: React.Dispatch<React.SetStateAction<Record<string, string>>>
177179
}) => {
@@ -180,7 +182,7 @@ const NavigationSection = ({
180182
const [newFavAddress, setNewFavAddress] = useState('')
181183

182184
const favoritesParam = params.find((p) => p.key === 'MapboxFavorites')
183-
const favoritesRaw = decode(favoritesParam?.value)
185+
const favoritesRaw = savedValues.MapboxFavorites ?? decode(favoritesParam?.value)
184186
const favorites: MapboxFavoritesData = useMemo(() => {
185187
if (!favoritesRaw) return {}
186188
try {
@@ -582,6 +584,7 @@ export const Component = () => {
582584
dongleId={dongleId}
583585
settings={settingsByCategory.navigation}
584586
changes={changes}
587+
savedValues={savedValues}
585588
getValue={getValue}
586589
setChanges={setChanges}
587590
/>

0 commit comments

Comments
 (0)