gaurishhs / elysia-decorators

Decorators support plugin for Elysia
MIT License
52 stars 6 forks source link

Fix: importClassesFromDirectories module import #14

Closed itsmeeudrino closed 4 weeks ago

itsmeeudrino commented 1 month ago

The current importClassesFromDirectories implementation uses Object#keys to loop over module exports, which seems to break the demo.

This PR changes the module loop to use for (key in obj) instead, which fixes the bug.

How to replicate the bug:

Run the demo by using

bun demo/index.ts

then navigate to http://localhost:3000/

Bun version: 1.1.8
gaurishhs commented 4 weeks ago

Thanks! Sorry for the late response.