Skip to content

Commit

Permalink
fix(Controller): respect default.pause prop when false
Browse files Browse the repository at this point in the history
Previously, the `pause` prop would override `default.pause` except when the latter was true.

Now, the `pause` prop must be a boolean before `default.pause` is overridden.

This ensures the paused async animation is resumed (if one exists) when the default `pause` prop is changed to false.
  • Loading branch information
aleclarson committed May 12, 2020
1 parent 57f59f2 commit 7e9e02b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/Controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ export async function flushUpdate(

if (!keys) {
let paused = getDefaultProp(props, 'pause')
if (paused !== true) {
paused = props.pause
if (paused !== true && typeof props.pause == 'boolean') {
paused = true
}
if (paused === true) {
ctrl.pause()
Expand Down

0 comments on commit 7e9e02b

Please sign in to comment.