diff options
author | Struan Donald <struan@exo.org.uk> | 2013-07-09 14:32:49 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-07-09 14:32:49 +0100 |
commit | b5b040a99b74a8c8fbeae31ce2b4d4322d6652e7 (patch) | |
tree | ef1b3846c82aae634a5bf0f6cea7f5644e649e5d /www/js/app.js | |
parent | 6d0ee5b541d917d8f895692f4c0e6c8676b3e92d (diff) |
Do not save an empty report when suspending the app. Fixes #36
Diffstat (limited to 'www/js/app.js')
-rw-r--r-- | www/js/app.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/www/js/app.js b/www/js/app.js index f416781..e8b2b21 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -90,9 +90,11 @@ var tpl = { saveCurrentDraft: function() { FMS.router.pause(); - FMS.allDrafts.add( FMS.currentDraft ); - FMS.currentDraft.save(); - localStorage.currentDraftID = FMS.currentDraft.id; + if ( FMS.currentDraft.isPartial() ) { + FMS.allDrafts.add( FMS.currentDraft ); + FMS.currentDraft.save(); + localStorage.currentDraftID = FMS.currentDraft.id; + } }, loadCurrentDraft: function() { |