Skip to content

Commit ced2571

Browse files
committed
fix: handle null useFormDeclarators
1 parent 1f1d604 commit ced2571

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

transforms/v7/update-register.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export default function transformer(file: FileInfo, api: API, options) {
2222
j
2323
)(useFormImportDeclaration);
2424

25+
if (!useFormDeclarators) {
26+
return;
27+
}
28+
2529
useFormDeclarators.forEach((useFormDeclarator) => {
2630
/**
2731
* We search for all `register` properties

0 commit comments

Comments
 (0)