Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit f64e5c5

Browse files
committed
fix raise error in transform sig
1 parent d3b5505 commit f64e5c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/reactjs_jsx_ppx.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2463,7 +2463,9 @@ module V4 = struct
24632463
| [] -> [item]
24642464
| [_] ->
24652465
(* If there is another @react.component, throw error *)
2466-
if !hasReactComponent then raise (Invalid_argument "2")
2466+
if !hasReactComponent then
2467+
Location.raise_errorf ~loc:psig_loc
2468+
"Each module should have one react component at most"
24672469
else hasReactComponent := true;
24682470
let hasForwardRef = ref false in
24692471
let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) =

0 commit comments

Comments
 (0)