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

Commit 280387d

Browse files
check variable name list for uniqueness of name
1 parent 0e64a0e commit 280387d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎client/packages/lowcoder/src/comps/editorState.tsx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,15 @@ export class EditorState {
493493
if (name !== oldName && this.nameAndExposingInfo().hasOwnProperty(name)) {
494494
return trans("comp.nameExists", { name: name });
495495
}
496+
497+
//Check query variable name duplication
498+
const queryComInfoList:string[] = [].concat(...(this.getQueriesComp()
499+
.toJsonValue().map((item: any) => item.variables.variables.map((v: any) => v.key))));
500+
501+
if (name !== oldName && queryComInfoList.includes(name)) {
502+
return trans("comp.nameExists", { name: name });
503+
}
504+
496505
return "";
497506
}
498507

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /