mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
Update formatUtil.ts (#2906)
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
@@ -135,7 +135,7 @@ export function getPathDetails(path: string) {
|
|||||||
* Replaces dots with underscores.
|
* Replaces dots with underscores.
|
||||||
*/
|
*/
|
||||||
export function normalizeI18nKey(key: string) {
|
export function normalizeI18nKey(key: string) {
|
||||||
return key.replace(/\./g, '_')
|
return typeof key === 'string' ? key.replace(/\./g, '_') : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -232,7 +232,9 @@ export function createAnnotatedPath(
|
|||||||
const { rootFolder = 'input', subfolder } = options
|
const { rootFolder = 'input', subfolder } = options
|
||||||
if (typeof item === 'string')
|
if (typeof item === 'string')
|
||||||
return `${createPath(item, subfolder)}${createAnnotation(item, rootFolder)}`
|
return `${createPath(item, subfolder)}${createAnnotation(item, rootFolder)}`
|
||||||
return `${createPath(item.filename ?? '', item.subfolder)}${item.type ? createAnnotation(item.type, rootFolder) : ''}`
|
return `${createPath(item.filename ?? '', item.subfolder)}${
|
||||||
|
item.type ? createAnnotation(item.type, rootFolder) : ''
|
||||||
|
}`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user