websockets (ws) removed socket.upgradeReq, so use req instead#1337
Merged
websockets (ws) removed socket.upgradeReq, so use req instead#1337
socket.upgradeReq, so use req instead#1337Conversation
shilman
reviewed
Jun 22, 2017
| const params = socket.upgradeReq && socket.upgradeReq.url | ||
| ? querystring.parse(socket.upgradeReq.url.substr(1)) | ||
| : {}; | ||
| const params = req.url ? querystring.parse(req.url.substr(1)) : {}; |
Member
There was a problem hiding this comment.
@Gongreg do we need req && req.url like in the previous code?
Member
Author
There was a problem hiding this comment.
Most likely no. Just safety check for req.url.substr().
shilman
approved these changes
Jun 22, 2017
Member
shilman
left a comment
There was a problem hiding this comment.
Approved, but build is breaking so I want to look into that before we merge. Thanks for your patience!
Codecov Report
@@ Coverage Diff @@
## master #1337 +/- ##
==========================================
+ Coverage 13.75% 13.76% +<.01%
==========================================
Files 202 202
Lines 4623 4621 -2
Branches 514 576 +62
==========================================
Hits 636 636
+ Misses 3543 3492 -51
- Partials 444 493 +49
Continue to review full report at Codecov.
|
socket.upgradeReq, so use req instead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
We used not existing property, so it was impossible to use manual id in RN storybook.
What I did
Changed upgradeReq to req
How to test
https://github.com/wix/react-native-storybook-example .
Build the project and run
npm run storybook-hosted.Enter the code displayed in browser to the app. Without the change it won't work.