mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix casing of shouldflushDiscreteUpdates
shouldflushDiscreteUpdates -> shouldFlushDiscreteUpdates
This commit is contained in:
@@ -610,7 +610,7 @@ export function processEventQueue(): void {
|
||||
return;
|
||||
}
|
||||
if (discrete) {
|
||||
if (shouldflushDiscreteUpdates(currentTimeStamp)) {
|
||||
if (shouldFlushDiscreteUpdates(currentTimeStamp)) {
|
||||
flushDiscreteUpdates();
|
||||
}
|
||||
discreteUpdates(() => {
|
||||
@@ -1019,7 +1019,7 @@ export function generateListeningKey(
|
||||
|
||||
let lastDiscreteEventTimeStamp = 0;
|
||||
|
||||
export function shouldflushDiscreteUpdates(timeStamp: number): boolean {
|
||||
export function shouldFlushDiscreteUpdates(timeStamp: number): boolean {
|
||||
// event.timeStamp isn't overly reliable due to inconsistencies in
|
||||
// how different browsers have historically provided the time stamp.
|
||||
// Some browsers provide high-resolution time stamps for all events,
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import {
|
||||
import {runExtractedPluginEventsInBatch} from 'events/EventPluginHub';
|
||||
import {
|
||||
dispatchEventForResponderEventSystem,
|
||||
shouldflushDiscreteUpdates,
|
||||
shouldFlushDiscreteUpdates,
|
||||
} from '../events/DOMEventResponderSystem';
|
||||
import {isFiberMounted} from 'react-reconciler/reflection';
|
||||
import {HostRoot} from 'shared/ReactWorkTags';
|
||||
@@ -229,7 +229,7 @@ function trapEventForPluginEventSystem(
|
||||
}
|
||||
|
||||
function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) {
|
||||
if (!enableEventAPI || shouldflushDiscreteUpdates(nativeEvent.timeStamp)) {
|
||||
if (!enableEventAPI || shouldFlushDiscreteUpdates(nativeEvent.timeStamp)) {
|
||||
flushDiscreteUpdates();
|
||||
}
|
||||
discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent);
|
||||
|
||||
Reference in New Issue
Block a user