Skip to content

Instantly share code, notes, and snippets.

@justinvdm
Created September 29, 2016 13:25
Show Gist options
  • Save justinvdm/26b4fc9a50b178bfbaec7abd95d382d1 to your computer and use it in GitHub Desktop.
Save justinvdm/26b4fc9a50b178bfbaec7abd95d382d1 to your computer and use it in GitHub Desktop.
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