Skip to content

Conversation

@cactysman
Copy link

@cactysman cactysman commented Feb 17, 2021

The current implementation of the onRequest logic requires the opts attribute to exist when getting a target from a registered route or a custom resolver's returned object. The case for the object returned by custom resolvers is that opts isn't set and the code fails with an exception due to the attempt of calling onRequest of undefined.

This PR makes sure opts is set and that its existence and onRequest being a function are first being checked on before processing.

@cactysman cactysman changed the title Prevent exceptions related to onRequest logic due to missing opts adoption in resolvers. Prevent exceptions related to onRequest logic due to missing opts adoption in custom resolvers. Feb 17, 2021
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.

1 participant