Skip to content

Commit

Permalink
Fix minor lint warnings (#6909)
Browse files Browse the repository at this point in the history
(cherry picked from commit 29ed7c6)
  • Loading branch information
lexjacobs authored and zpao committed Jun 14, 2016
1 parent 74ea71b commit 60cc2fe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
18 changes: 15 additions & 3 deletions src/renderers/dom/client/syntheticEvents/SyntheticEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
},

Expand Down
4 changes: 3 additions & 1 deletion src/renderers/native/ReactNativeAttributePayload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 6 additions & 1 deletion src/renderers/shared/fiber/isomorphic/ReactCoroutine.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ export type ReactYield = {
continuation: mixed
};

exports.createCoroutine = function<T>(children : mixed, handler : CoroutineHandler<T>, props : T, key : ?string = null) : ReactCoroutine {
exports.createCoroutine = function<T>(
children : mixed,
handler : CoroutineHandler<T>,
props : T,
key : ?string = null
) : ReactCoroutine {
var coroutine = {
// This tag allow us to uniquely identify this as a React Coroutine
$$typeof: REACT_COROUTINE_TYPE,
Expand Down

0 comments on commit 60cc2fe

Please sign in to comment.