Created
September 29, 2016 13:25
-
-
Save justinvdm/26b4fc9a50b178bfbaec7abd95d382d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/views/OnboardingSaving/index.js b/src/views/OnboardingSaving/index.js | |
index 6e5d780..deae9b7 100644 | |
--- a/src/views/OnboardingSaving/index.js | |
+++ b/src/views/OnboardingSaving/index.js | |
@@ -2,6 +2,10 @@ import React, { PropTypes } from 'react'; | |
import { OverlayLoading } from 'src/components'; | |
+// TODO remove once save race condition is fixed | |
+let saved = false; | |
+ | |
+ | |
class Saving extends React.Component { | |
// TODO: Stepper should dispatch an action when it's on the last view | |
componentDidMount() { | |
@@ -10,10 +14,14 @@ class Saving extends React.Component { | |
profile, | |
} = this.props; | |
- this.props.save({ | |
- id, | |
- profile, | |
- }); | |
+ if (!saved) { | |
+ saved = true; | |
+ | |
+ this.props.save({ | |
+ id, | |
+ profile, | |
+ }); | |
+ } | |
} | |
render() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment