Commit 0af96bde337e887895b042ccf379c54f73911110
only remove blog draft if publish was success!
mix irving committed on 6/11/2018, 2:30:12 AMParent: 4dc89a0bb95da4d859ec05de3fdd3ab23d59488b
Files changed
app/page/blogNew.js | changed |
app/page/blogNew.js | ||
---|---|---|
@@ -192,10 +192,12 @@ | ||
192 | 192 | }) |
193 | 193 | } |
194 | 194 | }, |
195 | 195 | (err, msg) => { |
196 | + if (err) return api.history.sync.push(err) | |
197 | + | |
196 | 198 | api.drafts.sync.remove(DRAFT_LOCATION) |
197 | - api.history.sync.push(err || { page: 'blogIndex' }) | |
199 | + api.history.sync.push({ page: 'blogIndex' }) | |
198 | 200 | } |
199 | 201 | ) |
200 | 202 | } |
201 | 203 |
Built with git-ssb-web