mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 11:40:33 +08:00
@allow-large-files Flow v0.54.0
Reviewed By: leebyron Differential Revision: D5773490 fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
This commit is contained in:
committed by
Facebook Github Bot
parent
25639176ff
commit
91b6b4efb9
@@ -18,6 +18,9 @@ const NativeModules = require('NativeModules');
|
||||
const Platform = require('Platform');
|
||||
const WebSocketEvent = require('WebSocketEvent');
|
||||
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
||||
* found when Flow v0.54 was deployed. To see the error delete this comment and
|
||||
* run Flow. */
|
||||
const base64 = require('base64-js');
|
||||
const binaryToBase64 = require('binaryToBase64');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
@@ -104,7 +107,13 @@ class WebSocket extends EventTarget(...WEBSOCKET_EVENTS) {
|
||||
// Preserve deprecated backwards compatibility for the 'origin' option
|
||||
if (unrecognized && typeof unrecognized.origin === 'string') {
|
||||
console.warn('Specifying `origin` as a WebSocket connection option is deprecated. Include it under `headers` instead.');
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
|
||||
* comment suppresses an error found when Flow v0.54 was deployed. To see
|
||||
* the error delete this comment and run Flow. */
|
||||
headers.origin = unrecognized.origin;
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
|
||||
* comment suppresses an error found when Flow v0.54 was deployed. To see
|
||||
* the error delete this comment and run Flow. */
|
||||
delete unrecognized.origin;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user