diff --git a/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js b/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js index 967c52a494a4..bf344599530b 100644 --- a/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js +++ b/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js @@ -173,9 +173,21 @@ Object.assign(SyntheticEvent.prototype, { this[shouldBeReleasedProperties[i]] = null; } if (__DEV__) { - Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); - Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); - Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null) + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', emptyFunction) + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', emptyFunction) + ); } }, diff --git a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js index 6c20afbd2fa7..c7ba1540de1d 100644 --- a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js +++ b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js @@ -225,7 +225,7 @@ describe('ReactDOMComponent', function() { }); ReactTestUtils.renderIntoDocument(); - expect(console.error.calls.length).toBe(0); + expect(console.error.calls.count()).toBe(0); }); it('should warn nicely about NaN in style', function() { diff --git a/src/renderers/native/ReactNativeAttributePayload.js b/src/renderers/native/ReactNativeAttributePayload.js index 4aaa8064494f..54912f354682 100644 --- a/src/renderers/native/ReactNativeAttributePayload.js +++ b/src/renderers/native/ReactNativeAttributePayload.js @@ -394,7 +394,9 @@ function diffProperties( // default: fallthrough case when nested properties are defined removedKeys = null; removedKeyCount = 0; - // $FlowFixMe - We think that attributeConfig is not CustomAttributeConfiguration at this point so we assume it must be AttributeConfiguration. + // $FlowFixMe - We think that attributeConfig is not + // CustomAttributeConfiguration at this point so we assume + // it must be AttributeConfiguration. updatePayload = diffNestedProperty( updatePayload, prevProp, diff --git a/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js b/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js index a03934ea56fc..36728c459621 100644 --- a/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js +++ b/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js @@ -42,7 +42,12 @@ export type ReactYield = { continuation: mixed }; -exports.createCoroutine = function(children : mixed, handler : CoroutineHandler, props : T, key : ?string = null) : ReactCoroutine { +exports.createCoroutine = function( + children : mixed, + handler : CoroutineHandler, + props : T, + key : ?string = null +) : ReactCoroutine { var coroutine = { // This tag allow us to uniquely identify this as a React Coroutine $$typeof: REACT_COROUTINE_TYPE,