Use stable array/object constants II
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
toValidServerConversions,
|
||||
} from '@/features/settings/ImageProcessing.utils.ts';
|
||||
import { Processing } from '@/features/settings/components/images/Processing.tsx';
|
||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||
|
||||
export const ImageProcessingSetting = ({ type }: { type: ImageProcessingType }) => {
|
||||
const { t } = useLingui();
|
||||
@@ -46,7 +47,7 @@ export const ImageProcessingSetting = ({ type }: { type: ImageProcessingType })
|
||||
|
||||
const settingKey = IMAGE_PROCESSING_TYPE_TO_SETTING[type];
|
||||
|
||||
const conversions = data?.settings?.[settingKey] ?? [];
|
||||
const conversions = data?.settings?.[settingKey] ?? STABLE_EMPTY_ARRAY;
|
||||
|
||||
const [tmpConversions, setTmpConversions] = useState(
|
||||
normalizeConversions(maybeAddDefault(addStableIdToConversions(conversions))),
|
||||
|
||||
Reference in New Issue
Block a user