mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
prevent resize error (#4031)
* add upper bound for minWidth to prevent crash with cypress * add fallback so UI doesnt crash when backend isnt running --------- Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
This commit is contained in:
parent
7d458eb1ac
commit
e191f6d4b2
@ -10,8 +10,11 @@ export const addAppConfigReceivedListener = () => {
|
|||||||
startAppListening({
|
startAppListening({
|
||||||
matcher: appInfoApi.endpoints.getAppConfig.matchFulfilled,
|
matcher: appInfoApi.endpoints.getAppConfig.matchFulfilled,
|
||||||
effect: async (action, { getState, dispatch }) => {
|
effect: async (action, { getState, dispatch }) => {
|
||||||
const { infill_methods, nsfw_methods, watermarking_methods } =
|
const {
|
||||||
action.payload;
|
infill_methods = [],
|
||||||
|
nsfw_methods = [],
|
||||||
|
watermarking_methods = [],
|
||||||
|
} = action.payload;
|
||||||
const infillMethod = getState().generation.infillMethod;
|
const infillMethod = getState().generation.infillMethod;
|
||||||
|
|
||||||
if (!infill_methods.includes(infillMethod)) {
|
if (!infill_methods.includes(infillMethod)) {
|
||||||
|
@ -227,7 +227,8 @@ const InvokeTabs = () => {
|
|||||||
id="gallery"
|
id="gallery"
|
||||||
order={3}
|
order={3}
|
||||||
defaultSize={
|
defaultSize={
|
||||||
galleryMinSizePct > DEFAULT_GALLERY_PCT
|
galleryMinSizePct > DEFAULT_GALLERY_PCT &&
|
||||||
|
galleryMinSizePct < 100 // prevent this error https://github.com/bvaughn/react-resizable-panels/blob/main/packages/react-resizable-panels/src/Panel.ts#L96
|
||||||
? galleryMinSizePct
|
? galleryMinSizePct
|
||||||
: DEFAULT_GALLERY_PCT
|
: DEFAULT_GALLERY_PCT
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user