Skip to content

Commit 0053630

Browse files
committed
fix(frontend): convert tags array to string for edit form reset
The tags input uses setValueAs to split a comma-separated string into an array. When form.reset() received an array from the template data, setValueAs tried to call .split() on the array, crashing the form. Convert to a comma-separated string before resetting. Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
1 parent 4079b11 commit 0053630

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/frontend/src/pages/attack-templates.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export function AttackTemplatesPage() {
8888
wordlistId: template.wordlistId,
8989
rulelistId: template.rulelistId,
9090
masklistId: template.masklistId,
91-
tags: template.tags,
91+
// Tags input displays a comma-separated string; setValueAs converts back to array
92+
tags: template.tags.join(', ') as unknown as string[],
9293
});
9394
setShowForm(true);
9495
};

0 commit comments

Comments
 (0)