This repository is a reproduction of an error that occurs when using Object.__proto__ in a Node.js environment.
This was first discovered while generating a router asynchronously via itty-router from within a Cloudflare Worker, but this minimal reproduction shows the issue is not specific to itty-router or Cloudflare Workers.
When using Object.__proto__ in a Node.js environment, the execution never gets to the point where a response is returned as shown in this reproduction.
To reproduce the bug, run the following commands:
npm install
npm startTo toggle the bug, switch between using createAsyncRouter and createRouter with the following commands:
npm run sync
npm run asyncJust by calling createAsyncRouter instead of createRouter, the erroneous behavior is observed (no response) -- even if you don't use the returned value.