diff --git a/invokeai/frontend/.eslintrc.js b/invokeai/frontend/.eslintrc.js index c0d6f3d3b8..73a11d5c95 100644 --- a/invokeai/frontend/.eslintrc.js +++ b/invokeai/frontend/.eslintrc.js @@ -31,6 +31,7 @@ module.exports = { 'space-before-blocks': 'error', 'import/prefer-default-export': 'off', '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '_+' }], + 'prettier/prettier': ['error', { endOfLine: 'auto' }], }, settings: { react: { diff --git a/invokeai/frontend/src/features/parameters/store/generationSlice.ts b/invokeai/frontend/src/features/parameters/store/generationSlice.ts index b6c67c8da4..6bd90b1842 100644 --- a/invokeai/frontend/src/features/parameters/store/generationSlice.ts +++ b/invokeai/frontend/src/features/parameters/store/generationSlice.ts @@ -195,8 +195,11 @@ export const generationSlice = createSlice({ } else { state.threshold = threshold; } - if (perlin) state.perlin = perlin; - if (typeof perlin === 'undefined') state.perlin = 0; + if (typeof perlin === 'undefined') { + state.perlin = 0; + } else { + state.perlin = perlin; + } if (typeof seamless === 'boolean') state.seamless = seamless; // if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg if (width) state.width = width; @@ -268,10 +271,16 @@ export const generationSlice = createSlice({ if (sampler) state.sampler = sampler; if (steps) state.steps = steps; if (cfg_scale) state.cfgScale = cfg_scale; - if (threshold) state.threshold = threshold; - if (typeof threshold === 'undefined') state.threshold = 0; - if (perlin) state.perlin = perlin; - if (typeof perlin === 'undefined') state.perlin = 0; + if (typeof threshold === 'undefined') { + state.threshold = 0; + } else { + state.threshold = threshold; + } + if (typeof perlin === 'undefined') { + state.perlin = 0; + } else { + state.perlin = perlin; + } if (typeof seamless === 'boolean') state.seamless = seamless; // if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg if (width) state.width = width;