[backport core/1.42] fix: use || instead of ?? and server type in WebcamCapture upload path (#11002)

Backport of #11000 to `core/1.42`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11002-backport-core-1-42-fix-use-instead-of-and-server-type-in-WebcamCapture-upload-p-33d6d73d3650810b9ec6d6141e635c82)
by [Unito](https://www.unito.io)

Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
Comfy Org PR Bot
2026-04-10 08:15:54 +09:00
committed by GitHub
parent e2dbd747c8
commit df5ea04d74

View File

@@ -143,9 +143,10 @@ app.registerExtension({
throw new Error(err)
}
const data = await resp.json()
const serverName = data.name ?? name
const subfolder = data.subfolder ?? 'webcam'
return `${subfolder}/${serverName} [temp]`
const serverName = data.name || name
const subfolder = data.subfolder || 'webcam'
const type = data.type || 'temp'
return `${subfolder}/${serverName} [${type}]`
}
// @ts-expect-error fixme ts strict error