From 2b7c3a8fb8fff63ce259678e4e4f776d405745b4 Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 9 Mar 2022 17:21:05 -0600 Subject: [PATCH] refactor: simplify --- packages/http/src/server/config.js | 6 +----- packages/react/src/ssr.js | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/http/src/server/config.js b/packages/http/src/server/config.js index 2f7e071..02c2a2f 100644 --- a/packages/http/src/server/config.js +++ b/packages/http/src/server/config.js @@ -57,8 +57,4 @@ class InlineConfig extends Transform { } -export const inlineConfig = (stream, req, flecks) => { - const inlineConfig = new InlineConfig(flecks, req); - stream.pipe(inlineConfig); - return inlineConfig; -}; +export const inlineConfig = (stream, req, flecks) => stream.pipe(new InlineConfig(flecks, req)); diff --git a/packages/react/src/ssr.js b/packages/react/src/ssr.js index a626e12..6012557 100644 --- a/packages/react/src/ssr.js +++ b/packages/react/src/ssr.js @@ -36,8 +36,4 @@ class Ssr extends Transform { } -export default (stream, req, flecks) => { - const ssr = new Ssr(flecks, req); - stream.pipe(ssr); - return ssr; -}; +export default (stream, req, flecks) => stream.pipe(new Ssr(flecks, req));