Skip to content

Commit 988a6ed

Browse files
committed
replace React.Fragment with an array
because Section is silly and iterates over `props.children` to insert the separators into the view… and a Fragment is a single child, wheras an array gets flattened before iteration. Yay.
1 parent b43ef9d commit 988a6ed

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/views/settings/screens/overview/login-credentials.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ class CredentialsLoginSection extends React.Component<Props, State> {
7575
{loggedIn ? (
7676
<Cell title={`Logged in as ${username}.`} />
7777
) : (
78-
<React.Fragment>
78+
[
7979
<CellTextField
80+
key={0}
8081
_ref={this.getUsernameRef}
8182
disabled={loading}
8283
label="Username"
@@ -86,10 +87,9 @@ class CredentialsLoginSection extends React.Component<Props, State> {
8687
returnKeyType="next"
8788
secureTextEntry={false}
8889
value={username}
89-
/>
90-
90+
/>,
9191
<CellTextField
92-
key="password"
92+
key={1}
9393
_ref={this.getPasswordRef}
9494
disabled={loading}
9595
label="Password"
@@ -99,8 +99,8 @@ class CredentialsLoginSection extends React.Component<Props, State> {
9999
returnKeyType="done"
100100
secureTextEntry={true}
101101
value={password}
102-
/>
103-
</React.Fragment>
102+
/>,
103+
]
104104
)}
105105

106106
<LoginButton

0 commit comments

Comments
 (0)