Skip to content

Commit 87c93c5

Browse files
committed
fix(forms,program_v2): make it typecheck on different versions of typings
1 parent 04cac1a commit 87c93c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

frontend/src/helpers/forceSlug.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ export function forceSlug(
1010
const newFormData = { ...formData };
1111

1212
for (const field of tryFields) {
13-
if (
14-
typeof newFormData[field] === "string" &&
15-
newFormData[field].length > 0
16-
) {
13+
if (typeof newFormData[field] === "string" && newFormData[field]) {
1714
const slug = slugify(newFormData[field]);
1815
newFormData.slug = slug;
1916
break;

0 commit comments

Comments
 (0)