Update ws message schema on reconnecting (#390)

* Update ws message schema on reconnecting

* nit
This commit is contained in:
Chenlei Hu
2024-08-12 13:21:48 -04:00
committed by GitHub
parent a5be1f6072
commit 91e21b1387
4 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ export function getInteruptButton(visibility: string) {
api.addEventListener(
'status',
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
const sz = detail.exec_info.queue_remaining
const sz = detail?.exec_info?.queue_remaining
btn.enabled = sz > 0
}
)

View File

@@ -85,7 +85,7 @@ export class ComfyQueueButton {
api.addEventListener(
'status',
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
this.#internalQueueSize = detail.exec_info.queue_remaining
this.#internalQueueSize = detail?.exec_info?.queue_remaining
if (this.#internalQueueSize != null) {
if (!this.#internalQueueSize && !app.lastExecutionError) {
if (