diff --git a/app/javascript/wardrobe-2020/loaders/alt-styles.js b/app/javascript/wardrobe-2020/loaders/alt-styles.js index 49a1ae1f..a0f1dc0e 100644 --- a/app/javascript/wardrobe-2020/loaders/alt-styles.js +++ b/app/javascript/wardrobe-2020/loaders/alt-styles.js @@ -1,11 +1,11 @@ import { useQuery } from "@tanstack/react-query"; -export function useAltStylesForSpecies(speciesId, options = {enabled = true}) { +export function useAltStylesForSpecies(speciesId, options = {}) { return useQuery({ ...options, queryKey: ["altStylesForSpecies", String(speciesId)], queryFn: () => loadAltStylesForSpecies(speciesId), - enabled: options.enabled && speciesId != null, + enabled: (options.enabled ?? true) && speciesId != null, }); }