mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 07:35:25 +00:00
Fix rest operator syntax errors
Summary:
These are caused by new [syntax checking](1285131e3e/CHANGELOG.md (v6113-2016-10-01)
) introduced by babylon.
"The single rest at the end only applies to binding `let { x, ...y } = obj;` and assignment `({ x, ...y } = obj).`"
I'd say this really should be cherry picked into the stable branch.
**Test plan**
1. install babylon@6.11.3
2. see that things break
3. apply patch
4. things work
5. make sure all instances were fixed (I used `\.\.\..*,.*\n.*=` in IntelliJ regex format—find all ... followed by newline followed by =)
Issue #10199
Closes https://github.com/facebook/react-native/pull/10200
Differential Revision: D3974066
Pulled By: javache
fbshipit-source-id: 3f3c1e9df01a3b3bdd61dd3863416c638d3ed98d
This commit is contained in:
parent
1941450649
commit
f77185f27e
@ -108,7 +108,7 @@ function arrayContains<T>(array: Array<T>, value: T): boolean {
|
||||
function createErrorFromErrorData(errorData: {message: string}): Error {
|
||||
const {
|
||||
message,
|
||||
...extraErrorInfo,
|
||||
...extraErrorInfo
|
||||
} = errorData;
|
||||
const error = new Error(message);
|
||||
(error:any).framesToPop = 1;
|
||||
|
@ -454,7 +454,7 @@ var ListView = React.createClass({
|
||||
|
||||
var {
|
||||
renderScrollComponent,
|
||||
...props,
|
||||
...props
|
||||
} = this.props;
|
||||
if (!props.scrollEventThrottle) {
|
||||
props.scrollEventThrottle = DEFAULT_SCROLL_CALLBACK_THROTTLE;
|
||||
|
@ -82,7 +82,7 @@ class NavigationCard extends React.Component<any, Props, any> {
|
||||
pointerEvents,
|
||||
renderScene,
|
||||
style,
|
||||
...props, /* NavigationSceneRendererProps */
|
||||
...props /* NavigationSceneRendererProps */
|
||||
} = this.props;
|
||||
|
||||
const viewStyle = style === undefined ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user