Oprava #6
Some checks failed
ci/woodpecker/push/workflow Pipeline failed

This commit is contained in:
Martin Berka 2025-02-27 21:36:21 +01:00
parent f4e31cea36
commit a34614c8db

View File

@ -192,9 +192,11 @@ function App() {
}, [auth?.login, easterEgg?.duration, easterEgg?.url, eggImage]);
const doAddClickFoodChoice = async (location: Locations, foodIndex?: number) => {
const locationKey = Object.keys(Locations).find(key => Locations[key as keyof typeof Locations] === location) as LocationKey;
if (auth?.login) {
await errorHandler(() => addChoice(locationKey, foodIndex, dayIndex));
if (document.getSelection()?.type !== 'Range') { // pouze pokud se nejedná o výběr textu
const locationKey = Object.keys(Locations).find(key => Locations[key as keyof typeof Locations] === location) as LocationKey;
if (auth?.login) {
await errorHandler(() => addChoice(locationKey, foodIndex, dayIndex));
}
}
}