Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
warning(
false,
'Relay: Unexpected fetch while using a null fragment ref ' +
'for fragment `%s` in `%s`. When fetching more items, we expect ' +
"initial fragment data to be non-null. Please make sure you're " +
'passing a valid fragment ref to `%s` before paginating.',
fragmentNode.name,
componentDisplayName,
componentDisplayName,
);
}
if (onComplete) {
// We make sure to always call onComplete asynchronously to prevent
// accidental loops in product code.
Scheduler.unstable_next(() => onComplete(null));
}
return {dispose: () => {}};
}
invariant(
fragmentSelector != null &&
fragmentSelector.kind !== 'PluralReaderSelector',
'Relay: Expected to be able to find a non-plural fragment owner for ' +
"fragment `%s` when using `%s`. If you're seeing this, " +
'this is likely a bug in Relay.',
fragmentNode.name,
componentDisplayName,
);
const parentVariables = fragmentSelector.owner.variables;
const fragmentVariables = fragmentSelector.variables;
return;
}
if (this.state.strategy !== 'async') {
flushSync(() => {
this.setState(state => ({
showDemo: !state.showDemo,
}));
});
return;
}
if (this._ignoreClick) {
return;
}
this._ignoreClick = true;
Scheduler.unstable_next(() => {
this.setState({showDemo: true}, () => {
this._ignoreClick = false;
});
});
};