Fix sketchy null checks induced by new formatting in Prettier 2.0

Summary:
Update code to prepare for Prettier 2.0, which will
reformat `a || (b || c)` to `a || b || c`.

Changelog: [Internal] prepare for Prettier 2.0

Reviewed By: kassens

Differential Revision: D20639483

fbshipit-source-id: c2932b1495884684172ba9291d56c546f51711b8
This commit is contained in:
Michael Bolin 2020-03-25 10:02:33 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 9637d6214a
Коммит 9064c18376
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -42,11 +42,9 @@ function createContainer<Props: Object, State>(
Props,
$FlowFixMeState,
> {
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
static displayName = `RNTesterStatePersister(${Component.displayName ||
Component.name})`;
static displayName = `RNTesterStatePersister(${String(
Component.displayName ?? Component.name,
)})`;
state = {value: spec.getInitialState(this.props)};
_cacheKey = `RNTester:${spec.version || 'v1'}:${spec.cacheKeySuffix(
this.props,