diff options
author | 2022-05-11 12:23:34 -0400 | |
---|---|---|
committer | 2022-05-11 10:23:34 -0600 | |
commit | abc5b219bb58c22b680da0486bc2b779e6661dd8 (patch) | |
tree | 8a6415ce274b919de53a85501e138ae125a55b3a /packages/integrations/solid | |
parent | 380acd23de6c0ccd1237d5a99a0af8641d17f4fa (diff) | |
download | astro-abc5b219bb58c22b680da0486bc2b779e6661dd8.tar.gz astro-abc5b219bb58c22b680da0486bc2b779e6661dd8.tar.zst astro-abc5b219bb58c22b680da0486bc2b779e6661dd8.zip |
Remove try/catch from solid component check (#3282)
* Remove try/catch from solid component check
* Move try/catch to renderComponent
* Add solid to integrations-playground example
Diffstat (limited to 'packages/integrations/solid')
-rw-r--r-- | packages/integrations/solid/server.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/integrations/solid/server.js b/packages/integrations/solid/server.js index 636fa50f6..dc4f88227 100644 --- a/packages/integrations/solid/server.js +++ b/packages/integrations/solid/server.js @@ -2,12 +2,8 @@ import { renderToString, ssr, createComponent } from 'solid-js/web'; function check(Component, props, children) { if (typeof Component !== 'function') return false; - try { - const { html } = renderToStaticMarkup(Component, props, children); - return typeof html === 'string'; - } catch (err) { - return false; - } + const { html } = renderToStaticMarkup(Component, props, children); + return typeof html === 'string'; } function renderToStaticMarkup(Component, props, children) { |