Skip to content

Fixed bug where trying to play the slider wouldn't work while the state was locked #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package/linkFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ module.exports = (snap, mode) => {

function newSetState(state, callback = () => { }) {
// dont do anything if state is locked
if (mode.locked) return;
// UNLESS we are currently jumping through time
if (mode.locked && !mode.jumping) return;
// continue normal setState functionality, except add sending message middleware
oldSetState(state, () => {
updateSnapShotTree();
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-time-travel",
"version": "1.0.1",
"version": "1.0.4",
"description": "A library that helps debug React by memorizing the state of components with every render.",
"main": "index.js",
"repository": {
Expand Down