File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1500,15 +1500,15 @@ let rec getCompletionsForContextPath ~full ~opens ~rawOpens ~allFiles ~pos ~env
1500
1500
in
1501
1501
(* We add React element functions to the completion if we're in a JSX context *)
1502
1502
let forJsxCompletion =
1503
- match ( inJsx, getTypePath typ) with
1504
- | true , Some ( Path. Pident id ) when Ident. name id = " int " -> Some " int "
1505
- | true , Some (Path. Pident id ) when Ident. name id = " float " ->
1506
- Some " float"
1507
- | true , Some (Path. Pident id ) when Ident. name id = " string" ->
1508
- Some " string"
1509
- | true , Some (Path. Pident id ) when Ident. name id = " array" ->
1510
- Some " array "
1511
- | _ -> None
1503
+ if inJsx then
1504
+ match getTypePath typ with
1505
+ | Some (Path. Pident id ) when Ident. name id = " int " -> Some " int "
1506
+ | Some ( Path. Pident id ) when Ident. name id = " float " -> Some " float"
1507
+ | Some (Path. Pident id ) when Ident. name id = " string" ->
1508
+ Some " string"
1509
+ | Some (Path. Pident id ) when Ident. name id = " array" -> Some " array "
1510
+ | _ -> None
1511
+ else None
1512
1512
in
1513
1513
match forJsxCompletion with
1514
1514
| Some builtinNameToComplete
You can’t perform that action at this time.
0 commit comments