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

Log method pre string notation #1919

Merged
merged 1 commit into from Sep 8, 2014
Merged

Log method pre string notation #1919

merged 1 commit into from Sep 8, 2014

Conversation

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Sep 8, 2014

Closes #1917

@hueniverse hueniverse added this to the 6.8.0 milestone Sep 8, 2014
geek added a commit that referenced this issue Sep 8, 2014
Log method pre string notation
@geek geek merged commit 56fa652 into master Sep 8, 2014
1 check passed
@geek geek deleted the issue/1917 branch Sep 8, 2014
@briandela
Copy link
Contributor

@briandela briandela commented Sep 9, 2014

@hueniverse Could this change have introduced a breaking change in 6.8.0? When I upgrade to Hapi 6.8.0 from 6.7.1 I see that server methods are behaving differently, and ones I have added via server.method('funcName', func) (e.g. server.method('removeTrailingSlash', removeTrailingSlash);) without specifying options seem to be getting a cache property and not being executed correct.

In 6.7.1 if I were to console.log(server.methods) in node-inspector I get:

{ fileNameWithoutExt: [Function],
  removeTrailingSlash: [Function],
  getMarketData: { [Function] cache: { drop: [Function] } },
  setPreferredMarket: [Function] }

In 6.8.0 I get:

{ fileNameWithoutExt: { [Function] cache: { drop: [Function] } },
  removeTrailingSlash: { [Function] cache: { drop: [Function] } },
  getMarketData: { [Function] cache: { drop: [Function] } },
  setPreferredMarket: { [Function] cache: { drop: [Function] } } }

When calling server.methods.removeTrailingSlash in 6.7.1 it behaves correctly, but in 6.8.0 it always returns undefined and when I step into the code, my removeTrailingSlash method is never called (same behaviour for the other methods which did not have an explicit options method passed when adding them to the server).

Any ideas?

@hueniverse
Copy link
Contributor Author

@hueniverse hueniverse commented Sep 9, 2014

This is a bug. #1922

@briandela
Copy link
Contributor

@briandela briandela commented Sep 10, 2014

Thanks!

@lock
Copy link

@lock 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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants