Skip to content

Commit 52d8bda

Browse files
authored
Merge pull request #42 from oslabs-beta/rydang/lockedplaying
Fixed bug where trying to play the slider wouldn't work while the state was locked
2 parents 5fd8fad + 8e5e3a5 commit 52d8bda

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package/linkFiber.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module.exports = (snap, mode) => {
2424

2525
function newSetState(state, callback = () => { }) {
2626
// dont do anything if state is locked
27-
if (mode.locked) return;
27+
// UNLESS we are currently jumping through time
28+
if (mode.locked && !mode.jumping) return;
2829
// continue normal setState functionality, except add sending message middleware
2930
oldSetState(state, () => {
3031
updateSnapShotTree();

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-time-travel",
3-
"version": "1.0.1",
3+
"version": "1.0.4",
44
"description": "A library that helps debug React by memorizing the state of components with every render.",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)