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

Prevent exceptions related to onRequest logic due to missing opts adoption in custom resolvers. #273

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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