diff options
author | Struan Donald <struan@exo.org.uk> | 2013-07-23 12:38:21 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-07-23 12:38:21 +0100 |
commit | 824d64b179b3c49370d571b71f498eef7ed990d5 (patch) | |
tree | ddfc1ca1fce155b0216d2e0f30689ece2de594f7 /src/js/views/submit.js | |
parent | 1cbe7e60df73bd03e2cc763ec6062b72a44f3fb3 (diff) |
If we pause the app then it seems to fire the report synced event on iOS
which means we change page. However, it does this outside the report
model so we set a success flag on the report and then check for that in
the sync event handler to make sure it's a genuine report sync event.
Fixes #59.
Diffstat (limited to 'src/js/views/submit.js')
-rw-r--r-- | src/js/views/submit.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/js/views/submit.js b/src/js/views/submit.js index ea36492..c98dbf3 100644 --- a/src/js/views/submit.js +++ b/src/js/views/submit.js @@ -52,6 +52,9 @@ }, onReportSync: function(model, resp, options) { + if ( model.success !== 1 ) { + return; + } this.stopListening(); this.afterSubmit(); if ( FMS.currentUser ) { |