mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-23 06:10:32 +00:00
fix: wire XOR validation to production + check abort signal after auth await
- Apply zComboInputOptionsValidated (which enforces remote XOR remote_combo) inside zComboInputSpec/V2 so the refinement actually runs during validateComfyNodeDef parsing. Previously zComboInputOptions (without refinement) was used and the XOR check only fired in standalone unit tests. - After awaiting authStore.getAuthHeader() in executeRemoteRequest, check signal.aborted and throw AbortError if the request was canceled during the await — keeps abort semantics correct when a component unmounts mid-fetch.
This commit is contained in:
@@ -35,6 +35,9 @@ async function executeRemoteRequest(
|
||||
if (descriptor.client === 'comfyApi') {
|
||||
const authStore = useAuthStore()
|
||||
const authHeader = await authStore.getAuthHeader()
|
||||
if (signal.aborted) {
|
||||
throw new DOMException('Aborted', 'AbortError')
|
||||
}
|
||||
headers = authHeader ? { ...authHeader } : undefined
|
||||
}
|
||||
const url = resolveUrl(descriptor, getComfyApiBaseUrl())
|
||||
|
||||
@@ -160,11 +160,11 @@ const zStringInputSpec = z.tuple([
|
||||
*/
|
||||
const zComboInputSpec = z.tuple([
|
||||
z.array(zComboOption),
|
||||
zComboInputOptions.optional()
|
||||
zComboInputOptionsValidated.optional()
|
||||
])
|
||||
const zComboInputSpecV2 = z.tuple([
|
||||
z.literal('COMBO'),
|
||||
zComboInputOptions.optional()
|
||||
zComboInputOptionsValidated.optional()
|
||||
])
|
||||
|
||||
export function isComboInputSpecV1(
|
||||
|
||||
Reference in New Issue
Block a user