mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
try to fix empty routing profile at first load
This commit is contained in:
@@ -22,7 +22,7 @@ export const routingProfileSelectItem = writable({
|
||||
});
|
||||
|
||||
derived([routingProfile, locale, isLoading], ([profile, l, i]) => [profile, l, i]).subscribe(([profile, l, i]) => {
|
||||
if (!i && profile !== get(routingProfileSelectItem).value && l !== null) {
|
||||
if (!i && profile !== '' && profile !== get(routingProfileSelectItem).value && l !== null) {
|
||||
routingProfileSelectItem.update((item) => {
|
||||
item.value = profile;
|
||||
item.label = get(_)(`toolbar.routing.activities.${profile}`);
|
||||
@@ -31,7 +31,7 @@ derived([routingProfile, locale, isLoading], ([profile, l, i]) => [profile, l, i
|
||||
}
|
||||
});
|
||||
routingProfileSelectItem.subscribe((item) => {
|
||||
if (item.value !== get(routingProfile)) {
|
||||
if (item.value !== '' && item.value !== get(routingProfile)) {
|
||||
routingProfile.set(item.value);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user