Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit917880e

Browse files
committed
Check for uniqueness of variable name within new cloned query
1 parent0cd9490 commit917880e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎client/packages/lowcoder/src/comps/queries/queryComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,13 +777,15 @@ class QueryListComp extends QueryListTmpComp implements BottomResListComp {
777777

778778
constjsonData=originQuery.toJsonValue();
779779
//Regenerate variable header
780+
constnewKeys:string[]=[];
780781
jsonData.variables?.variables?.forEach(kv=>{
781782
const[prefix,_]=(kv.keyasstring).split(/(?=\d+$)/);
782783
leti=1,newName="";
783784
do{
784785
newName=prefix+(i++);
785-
}while(editorState.checkRename("",newName));
786+
}while(editorState.checkRename("",newName)||newKeys.includes(newName));
786787
kv.key=newName;
788+
newKeys.push(newName);
787789
})
788790

789791
constnewQueryName=this.genNewName(editorState);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp