File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1611,15 +1611,15 @@ let rec getCompletionsForContextPath ~full ~opens ~rawOpens ~allFiles ~pos ~env
1611
1611
in
1612
1612
(* We add React element functions to the completion if we're in a JSX context *)
1613
1613
let forJsxCompletion =
1614
- match ( inJsx, getTypePath typ) with
1615
- | true , Some ( Path. Pident id ) when Ident. name id = " int " -> Some " int "
1616
- | true , Some (Path. Pident id ) when Ident. name id = " float " ->
1617
- Some " float"
1618
- | true , Some (Path. Pident id ) when Ident. name id = " string" ->
1619
- Some " string"
1620
- | true , Some (Path. Pident id ) when Ident. name id = " array" ->
1621
- Some " array "
1622
- | _ -> None
1614
+ if inJsx then
1615
+ match getTypePath typ with
1616
+ | Some (Path. Pident id ) when Ident. name id = " int " -> Some " int "
1617
+ | Some ( Path. Pident id ) when Ident. name id = " float " -> Some " float"
1618
+ | Some (Path. Pident id ) when Ident. name id = " string" ->
1619
+ Some " string"
1620
+ | Some (Path. Pident id ) when Ident. name id = " array" -> Some " array "
1621
+ | _ -> None
1622
+ else None
1623
1623
in
1624
1624
match forJsxCompletion with
1625
1625
| Some builtinNameToComplete
You can’t perform that action at this time.
0 commit comments