Skip to content

Commit

Permalink
Merge pull request #789 from glific/bug/automation-autosave
Browse files Browse the repository at this point in the history
Automation autosave when moving out of floweditor removed
  • Loading branch information
DigneshGujarathi authored Dec 7, 2020
2 parents 8a1570a + 5d4b477 commit 3e3c982
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/floweditor/FlowEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ export const FlowEditor = (props: FlowEditorProps) => {
document.body.removeChild(files[node]);
}
});
// clearing all timeouts when component unmounts
const highestTimeoutId = setTimeout(() => {});
for (let timeoutId = 0; timeoutId < highestTimeoutId; timeoutId += 1) {
clearTimeout(timeoutId);
}
};
}, []);

Expand Down

0 comments on commit 3e3c982

Please sign in to comment.