mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Prevent interface crash from dialog abuse (#1789)
- Adds hard-coded limit of 10 open dialogs - Discards the oldest item on the dialog stack to maintain size
This commit is contained in:
@@ -57,6 +57,10 @@ export const useDialogStore = defineStore('dialog', () => {
|
||||
props?: Record<string, any>
|
||||
dialogComponentProps?: DialogComponentProps
|
||||
}) {
|
||||
if (dialogStack.value.length >= 10) {
|
||||
dialogStack.value.shift()
|
||||
}
|
||||
|
||||
const dialog = {
|
||||
key: options.key,
|
||||
visible: true,
|
||||
|
||||
Reference in New Issue
Block a user