Skip to content

Commit

Permalink
Fix casing of shouldflushDiscreteUpdates
Browse files Browse the repository at this point in the history
shouldflushDiscreteUpdates -> shouldFlushDiscreteUpdates
  • Loading branch information
acdlite committed Jun 1, 2019
1 parent 91635dd commit 7aa35ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/events/DOMEventResponderSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ export function processEventQueue(): void {
return;
}
if (discrete) {
if (shouldflushDiscreteUpdates(currentTimeStamp)) {
if (shouldFlushDiscreteUpdates(currentTimeStamp)) {
flushDiscreteUpdates();
}
discreteUpdates(() => {
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/events/ReactDOMEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7aa35ce

Please sign in to comment.