Skip to content

Commit cd3edf4

Browse files
ttekeKent C. Dodds
authored and
Kent C. Dodds
committed
docs: fix error on complex example (#560)
Catch already sets error to error.message. So in render it should just show state.error.
1 parent 8db62fe commit cd3edf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function Login() {
248248
</div>
249249
<button type="submit">Submit{state.loading ? '...' : null}</button>
250250
</form>
251-
{state.error ? <div role="alert">{state.error.message}</div> : null}
251+
{state.error ? <div role="alert">{state.error}</div> : null}
252252
{state.resolved ? (
253253
<div role="alert">Congrats! You're signed in!</div>
254254
) : null}

0 commit comments

Comments
 (0)