From 9b9c15e4a9bc09560db54c1cbee91a8daabdf427 Mon Sep 17 00:00:00 2001 From: Rodolpho Cammarosano Date: Fri, 29 Sep 2023 23:22:29 +0200 Subject: [PATCH] [FIX] doc: error handling example A few corrections to make the example more realistic: - The component has no `error` property, so the writer probably meant `state.error`. - The "content" slot is not being set, and "default" does the job in this case. - The closing tag was missing in the `ErrorBoundary`'s template. --- doc/reference/error_handling.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/error_handling.md b/doc/reference/error_handling.md index 964a0353..b51fc51d 100644 --- a/doc/reference/error_handling.md +++ b/doc/reference/error_handling.md @@ -51,8 +51,8 @@ that render its content, and a fallback if an error happened. ```js class ErrorBoundary extends Component { static template = xml` - An error occurred - An error occurred + `; setup() { this.state = useState({ error: false });