mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 16:38:04 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -1,14 +1,12 @@
|
||||
import type {
|
||||
ValueSelector,
|
||||
} from '../types'
|
||||
import type {
|
||||
BlockEnum,
|
||||
ValueSelector,
|
||||
} from '../types'
|
||||
import { hasErrorHandleNode } from '.'
|
||||
|
||||
export const variableTransformer = (v: ValueSelector | string) => {
|
||||
if (typeof v === 'string')
|
||||
return v.replace(/^{{#|#}}$/g, '').split('.')
|
||||
return v.replace(/^\{\{#|#\}\}$/g, '').split('.')
|
||||
|
||||
return `{{#${v.join('.')}#}}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user