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

fix: support for module promise in Elysia#use #546

Merged
merged 2 commits into from Mar 18, 2024

Commits on Mar 17, 2024

  1. Copy the full SHA
    6b3241b View commit details
    Browse the repository at this point in the history
  2. fix: support for module promise in Elysia#use

    The following use case was broken: Calling `app.use(import("./routes"))` where the "./routes" module has a default export that is an Elysia instance.
    
    I‘m doing `instanceof Elysia` checks on the promise result and the module‘s "default" export, so a more informative error can be thrown, where before the app would crash with some obscure TypeError with a message of "Right side of assignment cannot be destructured" within the `Elysia#_use` method.
    aleclarson committed Mar 17, 2024
    Copy the full SHA
    6a5ae4b View commit details
    Browse the repository at this point in the history