Skip to content

Commit

Permalink
[Scheduler] Fix navigator.isInputPending call
Browse files Browse the repository at this point in the history
Must be called as a method.
  • Loading branch information
acdlite committed Jun 22, 2019
1 parent e7fcfe1 commit 595c941
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/scheduler/src/forks/SchedulerHostConfig.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ if (
navigator.scheduling !== undefined &&
navigator.scheduling.isInputPending !== undefined
) {
const isInputPending = navigator.scheduling.isInputPending;
const scheduling = navigator.scheduling;
shouldYieldToHost = function() {
const currentTime = getCurrentTime();
if (currentTime >= frameDeadline) {
Expand All @@ -186,7 +186,7 @@ if (
// yield regardless, since there could be a pending paint that wasn't
// accompanied by a call to `requestPaint`, or other main thread tasks
// like network events.
if (needsPaint || isInputPending()) {
if (needsPaint || scheduling.isInputPending()) {
// There is either a pending paint or a pending input.
return true;
}
Expand Down

0 comments on commit 595c941

Please sign in to comment.