-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
websockets (ws) removed socket.upgradeReq
, so use req
instead
#1337
Conversation
const params = socket.upgradeReq && socket.upgradeReq.url | ||
? querystring.parse(socket.upgradeReq.url.substr(1)) | ||
: {}; | ||
const params = req.url ? querystring.parse(req.url.substr(1)) : {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gongreg do we need req && req.url
like in the previous code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely no. Just safety check for req.url.substr().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.