mirror of
https://github.com/langgenius/dify.git
synced 2026-04-27 19:27:23 +08:00
amend regexp exec (#25986)
This commit is contained in:
parent
8940decd1b
commit
760a2c656c
@ -124,7 +124,7 @@ const useConfig = (id: string, payload: VariableAssignerNodeType) => {
|
|||||||
const handleAddGroup = useCallback(() => {
|
const handleAddGroup = useCallback(() => {
|
||||||
let maxInGroupName = 1
|
let maxInGroupName = 1
|
||||||
inputs.advanced_settings.groups.forEach((item) => {
|
inputs.advanced_settings.groups.forEach((item) => {
|
||||||
const match = item.group_name.match(/(\d+)$/)
|
const match = /(\d+)$/.exec(item.group_name)
|
||||||
if (match) {
|
if (match) {
|
||||||
const num = Number.parseInt(match[1], 10)
|
const num = Number.parseInt(match[1], 10)
|
||||||
if (num > maxInGroupName)
|
if (num > maxInGroupName)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user