Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up render.js #61

Merged
merged 1 commit into from Jul 31, 2023
Merged

Clean up render.js #61

merged 1 commit into from Jul 31, 2023

Conversation

vonagam
Copy link
Contributor

@vonagam vonagam commented Jul 31, 2023

  • Currently props and slots are always passed from server side so no need for default values, they are never applied.

  • There should be no need to delete require.cache because elixir-nodejs does it already on every call.

  • Object.fromEntries will always return an object so || {} is not needed after the call.

  • context is already new Map() by default so can be removed from options.

@woutdp
Copy link
Owner

woutdp commented Jul 31, 2023

Great improvement! I remember needing the delete require.cache code before but it seems to work without it now :)

@woutdp woutdp merged commit 11adc1a into woutdp:master Jul 31, 2023
@vonagam vonagam deleted the clean-render-function branch July 31, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants