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 server method registered as object without options #3702

wants to merge 1 commit into from


Copy link

@devinivy devinivy commented Nov 30, 2017

Currently (hapi v17.1.1, node v8, OSX) the following error occurs when attempting to register a server method of the form server.method({ name, method }) (without options),

      Cannot read property 'generateKey' of undefined

      at module.exports.internals.Methods._add (/hapi/lib/methods.js:51:40)
      at module.exports.internals.Methods.add (/hapi/lib/methods.js:37:18)
      at internals.Server.method (/hapi/lib/server.js:331:35)
      at it (/hapi/test/methods.js:98:16)

This PR offers a proposed fix and tests.

@hueniverse hueniverse self-assigned this Dec 20, 2017
@hueniverse hueniverse added the bug Bug or defect label Dec 20, 2017
@hueniverse hueniverse added this to the 17.1.2 milestone Dec 20, 2017
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
bug Bug or defect
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants