Skip to content

Commit 3a7efd8

Browse files
authored
COMPASS-850: Backport COMPASS 832 - Return to avoid running the success case on error of insert document (#821) (#827)
#retry "MongoDB runner - Error: socket hang up" https://travis-ci.com/10gen/compass/jobs/67360416
1 parent 30ab4cb commit 3a7efd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal-packages/crud/lib/store/insert-document-store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const InsertDocumentStore = Reflux.createStore({
2626
insertDocument: function(doc) {
2727
app.dataService.insertOne(NamespaceStore.ns, doc, {}, (error) => {
2828
if (error) {
29-
this.trigger(false, error);
29+
return this.trigger(false, error);
3030
}
3131
const filter = _.assign(this.filter, { _id: doc._id });
3232
app.dataService.count(NamespaceStore.ns, filter, {}, (err, count) => {

0 commit comments

Comments
 (0)