Commit 024ea9dddbb19f964209978d2b49f60c3e454d0c
Exists in
master
Merge branch 'refactor/beauremus_#201'
Closes #201
Showing
1 changed file
Show diff stats
imports/modules/document-editor.js
... | ... | @@ -17,13 +17,13 @@ const handleUpsert = () => { |
17 | 17 | |
18 | 18 | if (doc && doc._id) upsert._id = doc._id; |
19 | 19 | |
20 | - upsertDocument.call(upsert, (error, { insertedId }) => { | |
20 | + upsertDocument.call(upsert, (error, response) => { | |
21 | 21 | if (error) { |
22 | 22 | Bert.alert(error.reason, 'danger'); |
23 | 23 | } else { |
24 | 24 | component.documentEditorForm.reset(); |
25 | 25 | Bert.alert(confirmation, 'success'); |
26 | - browserHistory.push(`/documents/${insertedId || doc._id}`); | |
26 | + browserHistory.push(`/documents/${response.insertedId || doc._id}`); | |
27 | 27 | } |
28 | 28 | }); |
29 | 29 | }; | ... | ... |