File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export function getInteruptButton(visibility: string) {
1616 api . addEventListener (
1717 'status' ,
1818 ( { detail } : CustomEvent < StatusWsMessageStatus > ) => {
19- const sz = detail . exec_info . queue_remaining
19+ const sz = detail ? .exec_info ? .queue_remaining
2020 btn . enabled = sz > 0
2121 }
2222 )
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export class ComfyQueueButton {
8585 api . addEventListener (
8686 'status' ,
8787 ( { detail } : CustomEvent < StatusWsMessageStatus > ) => {
88- this . #internalQueueSize = detail . exec_info . queue_remaining
88+ this . #internalQueueSize = detail ? .exec_info ? .queue_remaining
8989 if ( this . #internalQueueSize != null ) {
9090 if ( ! this . #internalQueueSize && ! app . lastExecutionError ) {
9191 if (
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ export const useQueuePendingTaskCountStore = defineStore(
214214 } ) ,
215215 actions : {
216216 update ( e : CustomEvent < StatusWsMessageStatus > ) {
217- this . count = e . detail . exec_info . queue_remaining
217+ this . count = e . detail ? .exec_info ? .queue_remaining || 0
218218 }
219219 }
220220 }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const zStatusWsMessageStatus = z.object({
1919} )
2020
2121const zStatusWsMessage = z . object ( {
22- status : zStatusWsMessageStatus
22+ status : zStatusWsMessageStatus . nullable ( ) . optional ( )
2323} )
2424
2525const zProgressWsMessage = z . object ( {
You can’t perform that action at this time.
0 commit comments