Skip to content

Commit

Permalink
FIX: interface in case of no custom tranformations
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic-Marcelino committed Nov 8, 2024
1 parent 43f997c commit 9b0216a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ const systemTransformations = [
];
const allTransformations = computed(() => {
if (!settingsStore.settings.storage_asset_presets) {
return systemTransformations;
}
const customTransformations = settingsStore.settings.storage_asset_presets.map((preset) => ({
text: preset.key,
value: preset.key,
Expand All @@ -39,7 +43,7 @@ const displayAutoFormatNotice = computed(() => {
return props.value.find((transformationKey) => {
// check if transformation is a system transformation or if it's a custom transformation with format 'auto'
const isSystemTransformation = systemTransformations.some((transformation) => transformation.value === transformationKey);
const isAutoTransformation = settingsStore.settings.storage_asset_presets.some((preset) => preset.key === transformationKey && preset.format === 'auto');
const isAutoTransformation = settingsStore.settings.storage_asset_presets && settingsStore.settings.storage_asset_presets.some((preset) => preset.key === transformationKey && preset.format === 'auto');
return isSystemTransformation || isAutoTransformation;
});
});
Expand Down

0 comments on commit 9b0216a

Please sign in to comment.