From f6af6060f12b343ca6f40cd1163c4da9d219b22d Mon Sep 17 00:00:00 2001 From: Abanoub Ghadban Date: Sun, 13 Oct 2024 17:15:42 +0300 Subject: [PATCH] linting --- node_package/src/serverRenderReactComponent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node_package/src/serverRenderReactComponent.ts b/node_package/src/serverRenderReactComponent.ts index ef0378bff..ed392793a 100644 --- a/node_package/src/serverRenderReactComponent.ts +++ b/node_package/src/serverRenderReactComponent.ts @@ -226,14 +226,14 @@ export const streamServerRenderedReactComponent = (options: RenderParams): Reada renderResult = renderStream; // TODO: Add console replay script to the stream - // Ensure to avoid console messages leaking between different components rendering - } catch (e: any) { + } catch (e) { if (throwJsErrors) { throw e; } + const error = e instanceof Error ? e : new Error(String(e)); renderResult = stringToStream(handleError({ - e, + e: error, name: componentName, serverSide: true, }));