-
-
Notifications
You must be signed in to change notification settings - Fork 835
bug: beforeHydrateFn and afterHydrateFn are containing functions result instead of function references #5884
Copy link
Copy link
Closed
AnirudhJalagam/ionic-frameworkss
#2Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.19.2
Current Behavior
The expectation for the values of beforeHydrateFn and afterHydrateFn would be that they contain references to functions or noop. However, the variables currently contain the result of the function if beforeHydrate/afterHydrate have been defined in the options. As a result, a TypeError occurs.
Expected Behavior
The variables beforeHydrateFn and afterHydrateFn always contain a reference to a function.
System Info
System: node 18.18.2
Platform: darwin (23.5.0)
CPU Model: Apple M2 Pro (12 cpus)
Compiler: /node_modules/@stencil/core/compiler/stencil.js
Build: 1719938890
Stencil: 4.19.2 🏉
TypeScript: 5.4.5
Rollup: 2.56.3
Parse5: 7.1.2
jQuery: 4.0.0-pre
Terser: 5.31.1Steps to Reproduce
- Clone the repository
- Install node dependencies
- Run build
npm run build - Run
node dist/ssr-server/index.js - Run
curl -d '{"body": "<html><body></body></html>", "url": "http://localhost:3000/", "labels": [], "settings": []}' -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhostin second terminal session
Code Reproduction URL
https://github.com/tweis/stencil-hydration-typeerror-demo
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil